A toggle program

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
skbe
Posts: 1
Joined: 20 Oct 2021, 15:33

A toggle program

Post by skbe » 20 Oct 2021, 15:37

Hi there
I am new and I dont master the AHK unfortunately (not fully yet).

I am looking for a Toggle program just like this one:

Code: Select all

#8::
if (Toggle := !Toggle)
Send, {1}
else
Send, {2}
Return
However instead 1 and 2, I would like the program to toggle between this being the "1":

Code: Select all

sleep, 100
send, ^s
sleep, 100
{
mousemove, 3842, 944
}
and this being the "2":
^e

Any help for a script will be much appreciated!
Best regards

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

Re: A toggle program

Post by mikeyww » 20 Oct 2021, 17:08

Code: Select all

#8:: ; WIN-8
If on := !on {
 Sleep, 100
 Send ^s
 Sleep, 100
 MouseMove, 3842, 944
} Else Send ^e
Return

Post Reply

Return to “Ask for Help (v1)”