Hi,
I have two ahk script how can i run the secound script label from the first script?
What are the options?
Run label in another ahk Topic is solved
Re: Run label in another ahk Topic is solved
One way would be to "RemoteControl" Second.ahk from inside First.ahk, using onMessage() and SendMessage
Example:
I hope my simple example helps you to get started.
Example:
Code: Select all
; First.ahk
DetectHiddenWindows, On
SendMessage, 12345,,,, R:\Temp\Second.ahk ; this remotely controls a script
Code: Select all
; Second.ahk
OnMessage(12345, "RemoteControl")
return ; end of auto-execute section
;-------------------------------------------------------------------------------
Foo: ; some label
;-------------------------------------------------------------------------------
MsgBox,, %A_LineFile%, Line %A_LineNumber%: %A_ThisLabel%
return
;-------------------------------------------------------------------------------
RemoteControl() { ; remote control this script
;-------------------------------------------------------------------------------
goSub Foo
}
Re: Run label in another ahk
Thanks your help @wolf_II It worked
Who is online
Users browsing this forum: Chunjee and 209 guests