I'm having trouble writing a script to do the following (hopefully this is pretty simple):
once I press a keystroke (say, CTRL-ALT-L), I'd like AutoHotkey to send F4, F5, F6, F7, F8, in that order, but only one at a time. So the first time I press CTRL-ALT-L, send F4. The next time I press it, send F5, etc... Once it gets to F8, the next one should start over and send F4 again, and so on.
Any thoughts on this?
sending group of key strokes, one at a time
Re: sending group of key strokes, one at a time
Hallo,
try:
try:
Code: Select all
Keys := ["F4", "F5", "F6", "F7", "F8"]
No := 0
^!l::Send,% "{" Keys[Mod(No++,Keys.Length())+1] "}"
Re: sending group of key strokes, one at a time
That works beautifully, thank you! How would I limit the keystrokes to being sent when a specific window is current? ie Only send keystrokes when working in a particular .exe file on the screen?
Re: sending group of key strokes, one at a time
It sounds like you are looking for something like this
Code: Select all
#IfWinActive, put the title of the window you want to use here
;put all the hotkeys that you want to use when that window is active here
#if ; this exits the #If directive so that this window doesn't have to be active for other hotkeys to work.
Who is online
Users browsing this forum: No registered users and 238 guests