Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Internet Gambling > Software
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #16  
Old 07-05-2006, 01:18 AM
_dave_ _dave_ is offline
Senior Member
 
Join Date: Feb 2005
Location: UK
Posts: 2,628
Default Re: Table Highlighter (New AHK Script)

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 &lt;= 6)
{
th_bar_color = FF0000 ;red

SoundBeep, 1500, 20
Sleep, 30

}
Else If(remaining &lt;= 9)
{
th_bar_color = FF8000 ;orange
}
Else If(remaining &lt; 12)
{
th_bar_color = FFFF00 ;yellow
}
Else If(remaining &lt; 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.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:03 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.