Yeah I saw that the other night lol.
I tried your script but I noticed the parent window and the pop-up window both are call the same so the IF WinActive command always thinks the pop-up window exists. So for a work-around I am using image search. I made a screen capture of the windows unique image and am using that to match the pop-up using the code below. I borrowed some of your ideas and some of a script that was written by Leef_me. (thank you Leef_me
) and jammed em all together and came up with this. Not very pretty and not ideal but it gets the job done. I would prefer not to use imagesearch since it makes the script dependent on being able to access the file path to the image so I am still working on figuring out alternatives, but at least I have something I can use until I figure it out.
If you have any more ideas feel free to pass them along.
Thanks again for your help
Code: Select all
; script to query CORE and KO
^\::
#singleinstance force
settitlematchmode 2
SetKeyDelay,50
CoordMode, ToolTip, screen
CoordMode, Mouse, screen
CoordMode, Pixel, screen
image_name=refine search.bmp
send {enter}
send {shift}+{tab}
sleep 500
Send core{+}{enter}{enter}
send y
sleep 1000
send {enter}
sleep 1000
SysGet, VirtualScreenWidth, 78
SysGet, VirtualScreenHeight, 79
SysGet, VirtualScreenLeft, 76
SysGet, VirtualScreenTop, 77
;msgbox , ,, Search for the image on the window, 1
ImageSearch, OutputVarX, OutputVarY, VirtualScreenLeft, VirtualScreenTop
,VirtualScreenLeft+VirtualScreenWidth, VirtualScreenTop+VirtualScreenHeight,E:\portable_apps\PortableApps\autohotkey\imagesearch pics\refine search.bmp
if (errorlevel<>0)
{
send {pgUp}
send {enter}
WinWaitActive, Query - KO#
send !f
send p
send {enter}
}
else
{
msgbox, , , we will search for just the KO, 1
Send {tab 4}
Send K
Send {enter}
send {enter}
WinWaitActive, Query - KO#
send !f
send p
send {enter}
}
return