Need to pres 3 keys simultaneously every 2 secounds Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
johnw13
Posts: 3
Joined: 24 Jan 2023, 10:18

Need to pres 3 keys simultaneously every 2 secounds

Post by johnw13 » 07 Jun 2023, 06:27

Hello,

I need script that press keys Ctrl+Alt+R every 2 secounds. I have succeed to make a script that press one key every 2 secounds but can't do with 3 keys at same time...

Also, I compile a GUI for that script, and lost .ahk file. Is it possible to revert from GUI to .ahk?


Thanks everyone for help.

User avatar
mikeyww
Posts: 26944
Joined: 09 Sep 2014, 18:38

Re: Need to pres 3 keys simultaneously every 2 secounds

Post by mikeyww » 07 Jun 2023, 07:19

Welcome to this AutoHotkey forum!

Code: Select all

#Requires AutoHotkey v1.1.33
#Persistent
SetTimer go, 2000
go()
Return

go() {
 Send ^!r
}
I don't think AHK supports decompiling as a general activity, but there could be programs for it elsewhere.

johnw13
Posts: 3
Joined: 24 Jan 2023, 10:18

Re: Need to pres 3 keys simultaneously every 2 secounds

Post by johnw13 » 07 Jun 2023, 07:34

mikeyww wrote:
07 Jun 2023, 07:19
Welcome to this AutoHotkey forum!

Code: Select all

#Requires AutoHotkey v1.1.33
#Persistent
SetTimer go, 2000
go()
Return

go() {
 Send ^!r
}
I don't think AHK supports decompiling as a general activity, but there could be programs for it elsewhere.
Thanks, works perfectly! Just one more question, if I would like to start skript with F4 instead of #Persistent I put F4:: the script does start but it doesn't stop when I press F4 again, for some reason... Sorry I'm new. :D

User avatar
mikeyww
Posts: 26944
Joined: 09 Sep 2014, 18:38

Re: Need to pres 3 keys simultaneously every 2 secounds  Topic is solved

Post by mikeyww » 07 Jun 2023, 10:33

Code: Select all

#Requires AutoHotkey v1.1.33

F4::
If on := !on {
 SetTimer go, 2000
 go()
 SoundBeep 1500
} Else {
 SetTimer go, Off
 SoundBeep 1000
}
Return

go() {
 Send ^!r
}

johnw13
Posts: 3
Joined: 24 Jan 2023, 10:18

Re: Need to pres 3 keys simultaneously every 2 secounds

Post by johnw13 » 07 Jun 2023, 15:04

mikeyww wrote:
07 Jun 2023, 10:33

Code: Select all

#Requires AutoHotkey v1.1.33

F4::
If on := !on {
 SetTimer go, 2000
 go()
 SoundBeep 1500
} Else {
 SetTimer go, Off
 SoundBeep 1000
}
Return

go() {
 Send ^!r
}
Thank you verry much! :superhappy:

Post Reply

Return to “Ask for Help (v1)”