Help me

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
archi
Posts: 19
Joined: 07 Apr 2016, 10:48

Help me

08 Apr 2016, 19:23

Code: Select all

F1 :: WinActivate , WINDOW1
F2 :: WinActivate , WINDOW2
F3 :: WinActivate , WINDOW3

^q :: Good morning ... etc {enter } { sleep 1 }

#F1 ::
WinActive_Win1 :
WinActivate , Name WINDOW1
Send, { Space } { sleep 1 } ^ q
return

#F2 ::
WinActive_Win2 :
WinActivate , Name WINDOW2
Send, { Space } { sleep 1 } ^ q
return

#F3 ::
WinActive_Win3 :
WinActivate , Name WINDOW3
Send, { Space } { sleep 1 } ^ q
return
So far everything works well for me.
but when I want to create a new script that runs 3 I do not know how to do it
want ^F9 could call #F1 #F2 #F3

Code: Select all

^ F9 ::
GOSUB , WinActive_Win1

GOSUB , WinActive_Win2

GOSUB , WinActive_Win3

return
try to do it directly but skip any window

Code: Select all

^F9:: send #{F1} {sleep 10} #{F2} {sleep 10}#{F3} {sleep 10}
User avatar
Exaskryz
Posts: 2882
Joined: 17 Oct 2015, 20:28

Re: Help me

08 Apr 2016, 22:07

I'm not sure what you are asking to do. Is this what you want?

Code: Select all

^F9::
GoSub, #F1
Sleep 10
GoSub, #F2
Sleep 10
GoSub, #F3
Sleep 10
return
You can use a hotkey as a label.
archi
Posts: 19
Joined: 07 Apr 2016, 10:48

Re: Help me

08 Apr 2016, 23:26

ok thx :)
Shadowpheonix
Posts: 1259
Joined: 16 Apr 2015, 09:41

Re: Help me

11 Apr 2016, 11:12

archi wrote:

Code: Select all

F1 :: WinActivate , WINDOW1
F2 :: WinActivate , WINDOW2
F3 :: WinActivate , WINDOW3

^q :: Good morning ... etc {enter } { sleep 1 }

#F1 ::
WinActive_Win1 :
WinActivate , Name WINDOW1
Send, { Space } { sleep 1 } ^ q
return

#F2 ::
WinActive_Win2 :
WinActivate , Name WINDOW2
Send, { Space } { sleep 1 } ^ q
return

#F3 ::
WinActive_Win3 :
WinActivate , Name WINDOW3
Send, { Space } { sleep 1 } ^ q
return
So far everything works well for me.
but when I want to create a new script that runs 3 I do not know how to do it
want ^F9 could call #F1 #F2 #F3

Code: Select all

^ F9 ::
GOSUB , WinActive_Win1

GOSUB , WinActive_Win2

GOSUB , WinActive_Win3

return

FYI, the reason this did not work is that you have spaces before the : in your labels (IE: you have WinActive_Win3 : instead of WinActive_Win3:).

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], GooGooPark, just me, Rohwedder and 111 guests