#1
|
|||
|
|||
AHK Coding Problem/Opening Tables on Party
As a few of you use AHK a lot, I thought I'd have some luck asking here, as it's a Party-specific problem, rather than one related to AHK. I think.
I have four strings containing the names of tables on Party. For example, the contents of table_name1 might be "Table 126640". I now want to open these four tables. The problem is that it'll open the first, immediately go back to the lobby, open the second, go back, etc. This then quite often leaves it only opening one or two of the tables. If I have no lag and if my PC is doing nothing else, it's fine. How do I get AHK to not go to the next step in the loop until the table is open? I have close to zero experience with AHK. <font class="small">Code:</font><hr /><pre> array_count = 0 ; Reset array to zero (it starts at 1) Loop, 4 ; Do all of this four times { array_count++ ControlFocus, SysListView321, ahk_id%lobby_id% ControlGet, focused, List, Count Focused, SysListView321, ahk_id%lobby_id% ControlGet, table_count, List, Count, SysListView321, ahk_id%lobby_id% Loop, %focused% ; Go to top of the table list ControlSend, SysListView321, {UP}, ahk_id%lobby_id% Loop, %table_count% ; Go down list, search for table, if you find it, open it { ControlGet, name, List, Focused Col1, SysListView321, ahk_id%lobby_id% test := name = table_name%array_count% if test = 1 ControlSend, SysListView321, {Enter}, ahk_id%lobby_id% if test = 0 ControlSend, SysListView321, {DOWN}, ahk_id%lobby_id% } }</pre><hr /> |
|
|