Code:
#NoEnv
SendMode Input
CoordMode, Mouse, relative
;-------- CONFIG---------
TableClass = PokerStarsTableFrameClass
DropdownClass =
;Chip Icon COORD (table relative):
IconX =
IconY =
;Tag Hand In Progress OFFSET (relative to above coord):
TagMenuX =
TagMenuY =
;Tag Item OFFSET (relative to above coord):
TagItemX =
TagItemY =
MenuDelay = 100 ;msec
^Numpad0:: ;CTRL+Numpad0
;------------------------
IfWinActive, ahk_class %TableClass%
{
id := WinExist("A")
MouseGetPos, x, y
MouceClick, left, IconX, IconY
Sleep %MenuDelay%
MouseMove, TagMenuX, TagMenuY, R
IfWinActive, ahk_class %DropdownClass%
{
MouseClick, left
Sleep %MenuDelay%
MouseMove, TagItemX, TagItemY, R
}
IfWinActive, ahk_class %DropdownClass%
{
MouseClick, left
WinActivate, ahk_id%id%
MouseMove, x, y
}
}
else, Send {0}
return
Unfortunately neither do I know the ClassNN of the menu items, nor can I test the script. But I guess if you manage to figure out the coords,
offsets, and ahk_class of the dropdown menu with WindowSpy, this *might* work.
http://www.autohotkey.com/docs/commands/MouseMove.htm
"If this parameter is the letter R, the X and Y coordinates will be treated as offsets from the current mouse position. In other words, the cursor will be moved from its current position by X pixels to the right (left if negative) and Y pixels down (up if negative)."
Last edited by Baobhan-Sith; 02-11-2014 at 01:36 PM.