Open Side Menu Go to the Top
Register
Seeking: AHK Script Table Frame/Boarder on SNGs > 0 Seeking: AHK Script Table Frame/Boarder on SNGs > 0

10-21-2014 , 08:35 AM
I am looking for someone who would be able to build (or edit) an AHK that would provide a frame for a Pokerstars SNG table that is over a set buyin, so all games >$100 would have a green frame for example please?

http://forumserver.twoplustwo.com/19...ndows-1465433/

I believe this thread is close, but not quite right. I stack my tables and am seeking a 2 pixel boarder around the outside of a table if the buyin is >$100

More than happy to pay $ for your time.
Seeking: AHK Script Table Frame/Boarder on SNGs > 0 Quote
10-21-2014 , 09:57 AM
Do you need it just for the topmost table since you stack?
Code:
#SingleInstance, Force
Settitlematchmode, 2
SetWinDelay,-1
SetBatchLines, -1

; Border of the "Highlighter"
border_color := "00ff00"
border_size := 2
trans := 255

GroupAdd, tables, Table ahk_class PokerStarsTableFrameClass
settimer,Highlighter,25
return

HighLighter:
HighLighter()
return

HighLighter()
{
global OldX,OldY,OldW,OldH
global last_table_id
global border_color
global border_size
global trans
 winget,id,id,Ahk_group tables
 wingetpos,x,y,w,h,ahk_id%id%
 wingettitle,title,ahk_id%id%
 if instr(title,"Sat:")>0
 stringmid,buyin,title,instr(title,"$","",instr(title,A_space))+1,instr(title,A_space,"",instr(title,"$","",instr(title,A_space)))-instr(title,"$","",instr(title,A_space))-1
 else
 stringmid,buyin,title,instr(title,"$")+1,instr(title,A_space,"",instr(title,"$"))-instr(title,"$")-1
 if (buyin>=100) && ((id != last_table_id) || ((OldX <> X || OldY <> Y || OldW <> W || OldH <> H)))    
 {
  OldX := ActiveX
  OldY := ActiveY
  OldW := ActiveW
  OldH := ActiveH
  last_table_id := id  
   guinum := 2
   Gui, %guinum%: +Alwaysontop +Lastfound +Owner
   Gui, %guinum%: Color, %border_color%
   WinSet, Transparent, %trans%
   Gui, %guinum%: -Caption
   x1:=x-border_size
   y1:=y-border_size
   y2 := y + h 
   x2 := x + w
   w+=2*border_size
   h+=border_size
   Gui, %guinum%: Show, w%w% h%border_size% x%x1% y%y1% NoActivate    
   guinum++
   Gui, %guinum%: +Alwaysontop +Lastfound +Owner
   Gui, %guinum%: Color, %border_color%
   WinSet, Transparent, %trans%
   Gui, %guinum%: -Caption
   Gui, %guinum%: Show, w%border_size% h%h% x%x1% y%y% NoActivate    
   guinum++
   Gui, %guinum%: +Alwaysontop +Lastfound +Owner
   Gui, %guinum%: Color, %border_color%
   WinSet, Transparent, %trans%
   Gui, %guinum%: -Caption
   Gui, %guinum%: Show, w%w% h%border_size% x%x1% y%y2% NoActivate    
   guinum++
   Gui, %guinum%: +Alwaysontop +Lastfound +Owner
   Gui, %guinum%: Color, %border_color%
   WinSet, Transparent, %trans%
   Gui, %guinum%: -Caption
   Gui, %guinum%: Show, w%border_size% h%h% x%x2% y%y% NoActivate     
}
else
{
   Gui, 2: Cancel
   Gui, 3: Cancel
   Gui, 4: Cancel
   Gui, 5: Cancel
   last_table_id=
}
}
return
Seeking: AHK Script Table Frame/Boarder on SNGs &gt; 0 Quote
10-21-2014 , 10:27 AM
Thanks! That's is exactly what I was after except for a slight problem with some tournaments. E.g. a $37.50 buyin that has the titlebar: "The Big $109 Sat: $37.50 Hyper-Turbo" - it is a 2 person paid $37.50 entry to a $109 MTT.

Would it be easier if I define the 4 SNGs I play that are > $109 buyin?

Quote:
Saturday Super-Knockout Sat: $109 Hyper-Turbo [2 Seats]
Wed Eighty Grand Sat: $109 Hyper-Turbo [2 Seats]
Sunday $500 Sat: $181 Hyper-Turbo [2 Seats]
Super Tuesday Sat: $357 Hyper-Turbo [2 Seats]

Quote:
Originally Posted by Max1mums
Do you need it just for the topmost table since you stack?
Yes.
Seeking: AHK Script Table Frame/Boarder on SNGs &gt; 0 Quote
10-21-2014 , 11:08 AM
Ok, should work fine now
Code:
#SingleInstance, Force
Settitlematchmode, 2
SetWinDelay,-1
SetBatchLines, -1

; Border of the "Highlighter"
border_color := "00ff00"
border_size := 2
trans := 255

GroupAdd, tables, Table ahk_class PokerStarsTableFrameClass
settimer,Highlighter,25
return

HighLighter:
HighLighter()
return

HighLighter()
{
global OldX,OldY,OldW,OldH
global last_table_id
global border_color
global border_size
global trans
 winget,id,id,Ahk_group tables
 wingetpos,x,y,w,h,ahk_id%id%
 wingettitle,title,ahk_id%id%
 if instr(title,"Sat:")>0
 stringmid,buyin,title,instr(title,"$","",instr(title,"Sat:"))+1,instr(title,A_space,"",instr(title,"$","",instr(title,"Sat:")))-instr(title,"$","",instr(title,"Sat:"))-1
 else
 stringmid,buyin,title,instr(title,"$")+1,instr(title,A_space,"",instr(title,"$"))-instr(title,"$")-1
 if (buyin>=100) && ((id != last_table_id) || ((OldX <> X || OldY <> Y || OldW <> W || OldH <> H)))    
 {
  OldX := ActiveX
  OldY := ActiveY
  OldW := ActiveW
  OldH := ActiveH
  last_table_id := id  
   guinum := 2
   Gui, %guinum%: +Alwaysontop +Lastfound +Owner
   Gui, %guinum%: Color, %border_color%
   WinSet, Transparent, %trans%
   Gui, %guinum%: -Caption
   x1:=x-border_size
   y1:=y-border_size
   y2 := y + h 
   x2 := x + w
   w+=2*border_size
   h+=border_size

   Gui, %guinum%: Show, w%w% h%border_size% x%x1% y%y1% NoActivate    
   guinum++
   Gui, %guinum%: +Alwaysontop +Lastfound +Owner
   Gui, %guinum%: Color, %border_color%
   WinSet, Transparent, %trans%
   Gui, %guinum%: -Caption
   Gui, %guinum%: Show, w%border_size% h%h% x%x1% y%y% NoActivate    
   guinum++
   Gui, %guinum%: +Alwaysontop +Lastfound +Owner
   Gui, %guinum%: Color, %border_color%
   WinSet, Transparent, %trans%
   Gui, %guinum%: -Caption
   Gui, %guinum%: Show, w%w% h%border_size% x%x1% y%y2% NoActivate    
   guinum++
   Gui, %guinum%: +Alwaysontop +Lastfound +Owner
   Gui, %guinum%: Color, %border_color%
   WinSet, Transparent, %trans%
   Gui, %guinum%: -Caption
   Gui, %guinum%: Show, w%border_size% h%h% x%x2% y%y% NoActivate     
}
else
{
   Gui, 2: Cancel
   Gui, 3: Cancel
   Gui, 4: Cancel
   Gui, 5: Cancel
   last_table_id=
}
}
return
Seeking: AHK Script Table Frame/Boarder on SNGs &gt; 0 Quote

      
m