OK thanks folks.
I've incorporated the last two suggested lines.
I'm getting some weird unexpected behavior with my code.
When I open the pop-up window I need to open, manually, and hit the key sequence that
needs to be delivered, I get the desired result.
But when I run my AHK code (below) that does the same thing, I get different results.
Code: Select all
F9::
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
PixelSearch, Px, Py, 1730, 397, 1906, 955, 0xFFFFCC, 3, Fast RGB
if ErrorLevel
MsgBox, That color was not found in the specified region.
else
MouseClick, Right, Px, Py
Sleep 1200
Send, o
Sleep 1200
Send, o
Sleep 1200
Send, (Up}
Sleep 1200
Send, (Up}
Sleep 1200
Send, {Enter}
return
I entered obscenely long sleep times to see what the code was up to.
Instead of sending o,o and then the two 'ups' and then 'enter'
AHK is sending o,o and then sending two {downs} followed by three {ups} and then {enter} !!!
Or AHK might not be sending that code, BUT my app is interpreting what's being sent as
what I've indicated above.
The right mouse click at the top of the code opens a pop-up menu that has 21 choices.
I want to highlight a choice near the middle of the list and then hit {Enter}.
I discovered a way to get close to the choice I want: If you hit the hot-key o (Set c
olor)
and then once again, it brings the cursor to just two positions below where it needs to be.
But now when I want to tell the pop-up to select {up} two times, it does the crazy moves I mentioned above.
Any ideas I could try?