![]() |
|
#16
|
|||
|
|||
|
Hi Adde,
I am glad you like my alterations to this script - let me re-state, I am now finding this script an essential part of my Party multi-tabling aresenal [img]/images/graemlins/smile.gif[/img] Many thanks. I have actually made a few more modifications now. I have changed the <font color="blue">TH_DoHighlight:</font> function to this - (new parts in <font color="blue">blue</font>, I think): Basically, this retrieves the countdown timer from "static3" (if it is visible), and makes the highlight bar cycle through varying colours depending upon the urgency of action required - it starts off cyan, then green, if it gets to less than 6 seconds, it goes red and also beeps the PC speaker [img]/images/graemlins/smile.gif[/img] -------------------------------------------------------------------------- TH_DoHighlight: <font color="blue"> th_bar_color = 00FFFF ;cyan ControlGet, s3vis, Visible, , Static3, ahk_id%tableID% if (s3vis) { ControlGetText, remaining, Static3, ahk_id%tableID% If( InStr(remaining, "You have") AND InStr(remaining, "secs to respond")) { StringMid, remaining, remaining, InStr(remaining, "You have")+9 StringMid, remaining, remaining, InStr(remaining, "secs to respond")-2,, L ;MsgBox %remaining% If(remaining <= 6) { th_bar_color = FF0000 ;red SoundBeep, 1500, 20 Sleep, 30 } Else If(remaining <= 9) { th_bar_color = FF8000 ;orange } Else If(remaining < 12) { th_bar_color = FFFF00 ;yellow } Else If(remaining < 16) { th_bar_color = 00FF00 ;green } } } </font> CoordMode, Pixel, Relative if (th_tables_arr%indexThis%2 = TRUE) { <font color="blue"> Gui, %guiNum%: Color, %th_bar_color%</font> continue } WinGetPos, x, y, w, h, ahk_id%tableID% px := x + th_bar_left py := y + th_bar_top Gui, %guiNum%: +Alwaysontop +Lastfound +Owner Gui, %guiNum%: Color, %th_bar_color% WinSet, Transparent, %th_bar_trans% Gui, %guiNum%: -Caption Gui, %guiNum%: Show, w%w% h%th_bar_height% x%px% y%py% NoActivate th_tables_arr%indexThis%2 := TRUE } -------------------------------------------------------------------------- There must be a more elegant way of doing this, but I am somewhat new to this AHK business... With this I can now play 8+ table of 6-max no problem... it is excellent, again, many thanks. My modifications I think are very crude, and surely there is a cleaner way of doing this? Is there an equivalent of the switch/case construct in AHK or must these things be done with many else/if statements? Many thanks, dave. |
|
|