Toggle off the script when pressing any key Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
99sheeps
Posts: 2
Joined: 12 Jun 2021, 05:12

Toggle off the script when pressing any key

12 Jun 2021, 05:21

Please help! I've made a simple toggle script but I want to stop my toggle if I press another random key.

Code: Select all

F1::
toggle := !toggle
	If toggle
		Send {w Down}
	else
		Send {w Up}
return
User avatar
mikeyww
Posts: 26891
Joined: 09 Sep 2014, 18:38

Re: Toggle off the script when pressing any key  Topic is solved

12 Jun 2021, 06:10

Code: Select all

F1::
Send {w Down}
Input, SingleKey, VL1
 , % "{LControl}{RControl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}{AppsKey}{F1}{F2}{F3}{F4}{F5}{F6}"
   . "{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}{Del}{Ins}{BS}{CapsLock}"
   . "{NumLock}{PrintScreen}{Pause}"
Send {w up}
Return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 299 guests