convert a script to v2.

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
Joey5
Posts: 97
Joined: 19 May 2023, 05:25

convert a script to v2.

06 Jan 2024, 13:15

Hi, Can someone please help me convert the following code to V2 version or show me how to do it? Does this question belong in the v2 section? Thank you.

Code: Select all

s::s

s & e::
e & s::Send #1

$e::
Send e
KeyWait Up, DT.2
If !ErrorLevel
 Send x
Return
User avatar
boiler
Posts: 17384
Joined: 21 Dec 2014, 02:44

Re: convert a script to v2.

06 Jan 2024, 14:07

Yes, it belongs in the v2 section, where it has now been moved. You're asking for help to write a v2 script.
User avatar
mikeyww
Posts: 27366
Joined: 09 Sep 2014, 18:38

Re: convert a script to v2.

06 Jan 2024, 14:47

Code: Select all

#Requires AutoHotkey v2.0
s::s
s & e::
e & s::Send '#1'

$e:: {
 Send 'e'
 If KeyWait('Up', 'DT.2')
  Send 'x'
}
GEV
Posts: 1005
Joined: 25 Feb 2014, 00:50

Re: convert a script to v2.

06 Jan 2024, 14:58

If you don't want UP to be triggered after e:

Code: Select all

#Requires AutoHotkey v2.0

s::s
s & e::
e & s::Send '#1'
$e::Send 'e'

#HotIf (A_PriorHotKey = "$e" AND A_TimeSincePriorHotkey < 200)

	Up::Send 'x'

#HotIf
Joey5
Posts: 97
Joined: 19 May 2023, 05:25

Re: convert a script to v2.

06 Jan 2024, 22:18

Thank you everyone!

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: No registered users and 45 guests