![]() |
|
#11
|
|||
|
|||
|
I just added a bit of code to match the string "Good Luck" in the titlebar of each table (we can't just check for "Table " prefix anymore).
------ IniRead, auto_launch, TableNavigator.ini, AutoLaunch, auto_launch, off <font color="red">TableType = Good Luck</font> SysGet, size_caption, 4 ------ ------ PlayMoney: If TableType = Play money <font color="red">TableType = Good Luck</font> else TableType = Play money Menu, FileMenu, ToggleCheck, Test on Play Money return ------ ------ <font color="red">SetTitleMatchMode, 2 ; ### JUK: Set so we can match "Play money" or "Good Luck" anywhere in the title</font> WinGet, id, list, %TableType% ahk_pid%pid% ahk_class #32770, , PartyPoker.com: , BLACK ;make a list of windows IDs matching ahk_pid/class, excluding the lobby Loop, %id% { StringTrimRight, this_id, id%a_index%, 0 ;look familiar? WinGetPos, x, y, w, h, ahk_id %this_id% w -= 50 ;this allows for slight overlap or slightly different table sizes h -= 50 If (x < a_screenwidth/6 AND y < a_screenheight/6) ;determine the table number based on its position table_1 = %this_id% If (x < a_screenwidth/6 AND y > a_screenheight/6 AND y < 2*h) table_2 = %this_id% If (x < a_screenwidth/6 AND y >= 2*h) table_3 = %this_id% If (x > a_screenwidth/6 AND y < a_screenheight/6 AND x < 2*w AND y < 2*h) table_4 = %this_id% If (x > a_screenwidth/6 AND y > a_screenheight/6 AND x < 2*w AND y < 2*h) table_5 = %this_id% If (x > a_screenwidth/6 AND x < 2*w AND y >= 2*h) table_6 = %this_id% If (y < a_screenheight/6 AND x >= 2*w) table_7 = %this_id% If (y > a_screenheight/6 AND x >= 2*w AND y < 2*h) table_8 = %this_id% If (x > a_screenwidth/6 AND x >= 2*w AND y >= 2*h) table_9 = %this_id% } table_list = %table_1%,%table_2%,%table_3%,%table_4%,%table_5%, %table_6%,%table_7%,%table_8%,%table_9% w += 50 ;reset to the actual width <font color="red">SetTitleMatchMode, 1 ; ### JUK: Just in case this needs to use prefix mode elsewhere.</font> ------ Without this I was navigating to some really strange invisible window(s) aswell as the 4 party windows! But everything else seem to be working fine [img]/images/graemlins/laugh.gif[/img] Thanks again for the update Roland [img]/images/graemlins/smile.gif[/img] Juk [img]/images/graemlins/smile.gif[/img] EDIT: Sry, I had two WinGets in their and didn't notice, fixed now [img]/images/graemlins/smile.gif[/img] |
|
|