Borrowing from https://www.autohotkey.com/docs/v2/lib/SendMessage.htm#ExPID as example:Error: Target control not found.
Code: Select all
SetTitleMatchMode 2
DetectHiddenWindows true
MsgNumber := 0x0044 ; WM_COMMNOTIFY
wParam := 0x405
lParam := 0
Control := ""
WinTitle := "SomeOtherScript.ahk - AutoHotkey v"
WinText := ""
ExcludeTitle := ""
ExcludeText := ""
Timeout := 0
RetValue := SendMessage(
MsgNumber,
wParam,
lParam,
Control,
;, ; uncomment this line and comment line above and script doesn't throw an error
WinTitle,
WinText,
ExcludeTitle,
ExcludeText,
Timeout,
)