I have these Auto Hotkey test scripts I'm trying to send to, the actual program I'm wanting to send messages to will also be an Auto Hotkey script.
I'll post the scripts here so you can see what it's sending.
Sender script;
Code: Select all
#SingleInstance, force
Run, %A_AHKPath% "%A_ScriptDir%\receiver.ahk",,,Instance#1_pid
WinWait, ahk_pid %Instance#1_pid% ; wait for main script window to be created
+F1::
DetectHiddenWindows, On ; main script window is hidden
WinGet, hwnd#1, ID, ahk_pid %Instance#1_pid%
SendMessage, 6000, , , , ahk_id %hwnd#1%
returnReceiver Script;
Code: Select all
#SingleInstance, force
OnMessage(6000, "Test")
return
Test(wparam,lparam, msg)
{
MsgBox, Test works! message number: %msg%
}While searching for an answer another post led me to Windows Spy. The results I get from monitoring the window messages with it are.
Using the AHK sender script.
Code: Select all
WM_USER + 4976 (0x00001770)
wParam: 0x00000000
lParam: 0x00000000Code: Select all
WM_APPCOMMAND
wParam: 0x00000000
lParam: 0x00001770[So I'm sure I'm not doing something correctly with Eg. What is the correct way to send the command from EG?
Thank you once gain for your help.
Rich