Code: Select all
run, c:\Program Files (x86)\The name of the Game\Path of Game\logs\SecondScript.ahk
Hotkey command
Code: Select all
run, c:\Program Files (x86)\The name of the Game\Path of Game\logs\SecondScript.ahk
Hotkey command
Code: Select all
run, c:\Program Files (x86)\The name of the Game\Path of Game\logs\SecondScript.ahk
Sleep 100
Send [
That won't work as it thinks the Send [ is part of the first script. I need to trigger the [ hotkey in the second script automatically once the second script is started by the first one (and yes I did try the sleep command prior to posting. Should have mentioned that).ThePeter wrote: ↑07 Dec 2022, 13:14Have you tried simply sending the key triggering the other hotkey?
Code: Select all
run, c:\Program Files (x86)\The name of the Game\Path of Game\logs\SecondScript.ahk Sleep 100 Send [
Code: Select all
; in first.ahk
SendLevel 1 ; or whichever value is higher than the #InputLevel of the hotkey in second.ahk
SendInput [ ; or SendEvent, but not SendPlay
While SendMessage/OnMessage is the more robust method it's beyond my scripting ability to do. I'll give SendLevel and SendInput a try.swagfag wrote: ↑07 Dec 2022, 18:24should work in most cases, but this is a crappy unreliable way of IPC between scripts. u should probably just SendMessage/OnMessage() insteadCode: Select all
; in first.ahk SendLevel 1 ; or whichever value is higher than the #InputLevel of the hotkey in second.ahk SendInput [ ; or SendEvent, but not SendPlay