i've done that using a crude method (no indexing).
i added a timer that runs the following.
Code:
ifwinactive, MicroPlanet Gravity ;AHK popup floater
{
if whichmenu <> 3
{
SoundPlay, f:\awav\.boing.wav
gosub gravmenupop
detectHiddenWindows, Off
return
}
}
here is the modifed popup.
Code:
gravmenupop:
#MaxThreadsPerHotkey 1 ;;_____________________popup menu
;;;;SoundPlay, f:\awav\.shorter.wav
whichmenu = 3
Menu = %MenuTitle%
Loop
{
IfEqual, gMenuItem%a_index%,, Break ;if index seq broken, end
;sleep 10
;msgbox, 0, , gMenuItem%a_index%, .9
MenuItems ++ ;how many menulines for leftclick
StringTrimLeft, MenuText, gMenuItem%a_index%, 0
Menu = %Menu%`n%MenuText%
}
mousemove, 750, 85
ToolTip, %Menu%
;WinActivate, %MenuTitle%
WinActivate, ahk_class tooltips_class32
sleep 50
MouseGetPos, xpos, ypos
xpos += 20
ypos += 60 ; 100
mousemove, %xpos%, %ypos%, 1
Return
here is the modified Lbutton
Code:
~LButton:: ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;;ahk_class tooltips_class32
#MaxThreadsPerHotkey 1
;SoundPlay, f:\awav\.shorter.wav
FileAppend, Lbutton clicked 1 %A_Hour% %A_Min% %A_Sec% %MenuTitle%`n, c:\popuptrace.txt
;WinActivate, ahk_class tooltips_class32
if whichmenu = 2, gosub popupmenu2
if whichmenu = 3
{
gosub gravmenu
return
}
IfWinNotActive, ahk_class tooltips_class32 ;;%MenuTitle%
{
;msgbox, 0, , menutitle not active, .6
FileAppend, popup winnotactive 2 %A_Hour% %A_Min% %A_Sec% %MenuTitle%`n, c:\popuptrace.txt
ToolTip
Return
}
CoordMode, Mouse, Relative
MouseGetPos, mX, mY
ToolTip ;toggles tooltip off
;send, {F16} ;msg to apps dialog.hk
mY -= 3 ;space after which first line starts
mY /= 18 ;space taken by each line
;/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IfLess, mY, 1, Return
IfGreater, mY, %MenuItems%, Return
StringTrimLeft, TargetSection, MenuItem%mY%, 0
sleep 50
;WinWaitActive, ahk_class tooltips_class32
FileAppend, popup activeee 2 %A_Hour% %A_Min% %A_Sec% %mY% %TargetSection% %MenuTitle%`n, c:\popuptrace.txt
Gosub, %TargetSection%
mY = 0
; mousemove, 400, 180
Return