Open Side Menu Go to the Top
Register
AHK script:Stars Filtered SNG Opener AHK script:Stars Filtered SNG Opener

12-16-2012 , 08:20 PM
Quote:
Originally Posted by Jan0s
I just noticed, that every session I get registered in one tournament which doesnt pop up.
...
requesting that tournament history works and says I have been sitting out all the time.
Max1mums is right, this is a known bug on PS' end, although it seems to happen much less frequently than it did some months ago. Report those tourneys to PS and ask them for a refund.
AHK script:Stars Filtered SNG Opener Quote
12-17-2012 , 07:32 AM
OK, thanks for the input, I wrote an Email to Pstars asking for refund.
AHK script:Stars Filtered SNG Opener Quote
12-18-2012 , 04:49 PM
script not working after last update?
AHK script:Stars Filtered SNG Opener Quote
12-18-2012 , 05:45 PM
jonatanko, try this version http://213.148.171.9/SFSO_4.0a.ahk
AHK script:Stars Filtered SNG Opener Quote
12-18-2012 , 06:03 PM
i think it is not working.
AHK script:Stars Filtered SNG Opener Quote
12-18-2012 , 09:06 PM
jonatanko, works fine for me for the .com version and i can't test it for the different PokerStars clients, read several posts above for the possible solution if you use .eu version.
AHK script:Stars Filtered SNG Opener Quote
12-18-2012 , 10:22 PM
even after todays update o stars client?
AHK script:Stars Filtered SNG Opener Quote
12-19-2012 , 05:42 PM
i restarted computer and its working thx
AHK script:Stars Filtered SNG Opener Quote
12-21-2012 , 04:46 PM
Times to scroll down doesnt work at all. AHK register me to to top game in lobby. Already tried every possible setup...

Code:
; Author:         Everlong@2p2 Code assembled from misc sources, thanks to _dave_, chris228, finnisher
; v.4.01
; added: option to atuobuyin if full, hide/show window
; fixed issue with skipping first sng in lobby 
; 4.0 version fixed by Max1mums 
#NoEnv
#SingleInstance, Force
SendMode Input
SetWorkingDir %A_ScriptDir%
SetBatchLines, -1
SetTitleMatchMode, 2
SetTimer, register, off
SetTimer, safeguard, off
StringTrimRight, thisahk, A_ScriptName, 4

IniRead, pspath, %thisahk%.ini, Settings, path
;;;;;;;;;;;SET YOUR pokerstars.log.0 file path here;;;;;;;;;;;;;;;
;;;;;;;;;;;eg logfile:="C:\Users\Herek\AppData\Local\PokerStars.EU\PokerStars.log.0"
logfile:="C:\Users\Herek\AppData\Local\PokerStars.EU\PokerStars.log.0"
IfNotExist %logfile%
{
 If A_OSVersion in WIN_VISTA
{		
IniWrite, %A_AppData%\Pokerstars\, %thisahk%.ini, Settings, path
IniRead, pspath, %thisahk%.ini, Settings, path 
logfile:= pspath . "pokerstars.log.0"
IfNotExist %logfile%
{
 StringGetPos,pos, pspath,Roaming
 StringLeft, pspath, pspath, %pos%
 pspath:=pspath . "Local\Pokerstars\"
 IniWrite, %pspath%, %thisahk%.ini, Settings, path
}
}
 Else							
 IniWrite, %ProgramFiles%\Pokerstars\, %thisahk%.ini, Settings, path
 IniRead, pspath, %thisahk%.ini, Settings, path
}
IfNotExist %logfile%
{
logfile:= pspath . "pokerstars.log.0"
IfNotExist %logfile%
msgbox, PokerStars.log.0 file was not found, recheck the configuration
}
;==============================================================
tcount=0
RegSofar=0
OpenTables=0
trows=17
SysGet,mon, MonitorworkArea
fivesec=0
ft:=0
two=0
ddlist4=Off|
ddlist5=Off|
ddlist6=Off|
ddlist7=Off|
LobbyList=Default|Black|
ddlist2:=ddlist2 . 1 . "|"
ddlist2:=ddlist2 . 2 . "|"
Loop 100
{
two:=two+2
ddlist3:=ddlist3 . two . "|"
ddlist:=ddlist . A_index . "|"
If (A_index<51)
{
fivesec:=fivesec+5
ddlist2:=ddlist2 . fivesec . "|"
ddlist6:=ddlist6 . fivesec . "|"
If (A_index<22)
{
ddlist7:=ddlist7 . A_Index . "|"
If (A_index<16)
{
ddlist4:=ddlist4 . A_index . "|"
}
}
}
else
{
ft:=ft+15
ddlist5:=ddlist5 . ft . "|"
}
}
ddlist3:=ddlist3 . 9999 . "|"
Gosub, BuildGui
Return
;==============================================================
;==============================================================

BuildGui:
Gui, color, white
Gui, font, cOlive
Gui, add, tab, h340 w240, General|Advanced Settings
Gui, add, text, , Auto-register
Gui, add, Checkbox, yp xp+80 Check3 Checked-1 vRegister
Gui, add, text, yp xp+30, Reg. next if full?
Gui, add, Checkbox, yp xp+80 VAutoifFull


Gui, add, text,xp-190 yp+30 , Register every (sec):
Gui, add, DropDownList, w50 yp-5 xp+140  vInterval1, %ddlist2%
Gui, add, text, xp-140 yp+30, No of SNG:s to keep open:
Gui, add, DropDownList, w50 yp-5 xp+140 vKeepOpen , %ddlist%
Gui, add, text,xp-140 yp+30, Limit total SNG:s to:
Gui, add, DropDownList, w50 yp-5 xp+140 vTotalLimit , %ddlist3%
Gui, add, text,xp-140 yp+30, Limit total time to (min):
Gui, add, DropDownList, w50 yp-5 xp+140 vLimitTime , %ddlist5%

Gui, add, text, xp-140 yp+30 cred vcdown w200
Gui, add, text, xp  yp+30 w200 vRegSofar, SNG:s registered so far:
Gui, add, text,  w200 vOpenTables, Tables open/waiting:
Gui, add, text, w200 cRed vStatus, Status: Idle
Gui, add, Button, w68 ggetgui, &Submit+Run
Gui, add, text, xp+72 yp+5, (Autosaves your settings)
Gui, Add, Button, Disabled xp-72 yp+20 w48 h20 Center , &Resume
Gui, Add, Button, Disabled  w45 h20 yp xp+48 Center , &Pause
Gui, Add, Button, w80 h20 yp xp+45 Center globbyrestore, &Lobby restore
Gui, Add, Button, w45 h20 yp xp+80 gDonate, &Donate
Gui, tab, 2

Gui, add, Text, x25 y65 , Lobby Theme:
Gui, add, DropDownList, w65 yp-5 xp+140 vLobby, %LobbyList%
Gui, add, text,xp-140 yp+30 , Close lobbies every (sec):
Gui, add, DropDownList, w50 yp-5 xp+140  vCloseInterv, %ddlist6%
Gui, add, text, xp-140 yp+18 , (manually Close with ctrl+e)
Gui, add, text, yp+30, Disable if no user Input (min):
Gui, add, DropDownList, w50 yp-5 xp+140 vGuardtimer Choose1 , %ddlist4%
Gui, add, text, xp-140 yp+30 ,Batch-register?
Gui, add, Checkbox,yp xp+140 vBatchReg
Gui, add, text, yp+20 xp-140 ,SetReg* mode?
Gui, add, Checkbox,yp xp+140 vSetReg
Gui, add, text, yp+20 xp-140 ,Minimize lobby?
Gui, add, Checkbox,yp xp+140 vMinlob
Gui, add, Text, xp-140 yp+30, Times to scroll down:
Gui, add, DropDownList, w50 yp-5 xp+140 vscrldwn, %ddlist7%
Gui, add, Text, xp-140 yp+25, Always start at top of lobby?
Gui, add, Checkbox, yp xp+140 vTopReturn
Gui, show, w256, %thisahk%
WinGetPos, x, y, w, h, SFSO
;x:=monRight-w
;y:=monBottom-h
x:=monLeft
y:=monTop
Gosub, GetIni
Gui, show, x%x% y%y%, %thisahk%
Return

getgui:
GuiControl,, Register, -1
Register = 1
tcount:=0
Gui, Submit, NoHide
displayedTime=
If (lobby="Default")
{
regButton:="PokerStarsButtonClass12"
}
Else If (lobby="Black" or lobby="Custom*")
{
regButton:="PokerStarsButtonClass12"
}
Gosub, MakeIni
PausedTime:=LimitTime
Gosub, TimeLimit
interval:=interval1*1000

If interval is not Number
interval=off

If guardtimer is not Number
{
SetTimer, safeguard, off
}
Else
{
killtime:=guardtimer*60000
SetTimer, safeguard, 1000
}
if CloseInterv is not number
SetTimer, NukeLobbies, off
else
{
lobclose:=CloseInterv*1000
SetTimer, NukeLobbies, %lobclose%
}
register=1
sleep,-1
Gosub, ButtonResume
Return

Safeguard:
If (A_TimeIdle > killtime)
{
Gosub, ButtonPause
GuiControl, , cdown, Stopped  due to inactivity!!! %displayedTime%
}
Return

TimeLimit:
If LimitTime is Number
{
allowedMinutes := LimitTime
endTime := A_Now
endTime += %allowedMinutes%, Minutes
SetTimer, CountDown, 1000
}
Else
{
SetTimer, CountDown, off
sleep,-1
GuiControl, , cdown, Time Limit off
}
Return

Countdown:
remainingTime := endTime
EnvSub remainingTime, %A_Now%, Seconds
m := remainingTime // 60
s := Mod(remainingTime, 60)
displayedTime := Format3Digits(m) ":" Format2Digits(s)
GuiControl, , cdown, Running another (mm:ss): %displayedTime%
If (A_now > endTime)
{
SetTimer, Countdown, off
Gosub, ButtonPause
GuiControl, , cdown, Time Limit reached.
}
Return

GuiClose:
Gui, Submit
Gosub, MakeIni
ExitApp
Return

ButtonResume:
Gui, Submit, NoHide
GuiControl, Disable, &Resume
GuiControl, Enable, &Pause
if LimitTime is Number
If PausedTime is Number
LimitTime:=PausedTime
Gosub, TimeLimit
GuiControl, , Register, -1
Register:=1
settimer, AutoReg,37
tcount:=0
CountTourneys(1)
Gosub,Register
SetTimer, Register, %Interval%
sleep,-1
Return

ButtonPause:
Critical
Gui, Submit, NoHide
if LimitTime is Number
PausedTime:=remainingTime/60
Register:=0
settimer, AutoReg,off
SetTimer, Countdown, off
SetTimer, Register, off
GuiControl, Disable, Pause
GuiControl, Enable, Resume
GuiControl, , Register, 0
GuiControl, , cdown, Manually Paused %displayedTime%
GuiControl, , Status, Status: Waiting ;TEST
Return

Register:
SetTitleMatchMode, 2
WinGet, LobbyID, id, PokerStars Lobby - ahk_class #32770

If !LobbyID
{
Gosub, ButtonPause
GuiControl,, Status, Status: PokerStars Lobby not found
Gui, show, NoActivate, %thisahk%
Return
}
If (TopReturn=1)
{
ControlSend, PokerStarsListClass2, {NumpadUp 20}, ahk_id%lobbyid%
}
WinGet, PhysicalTables, list,Table ahk_class PokerStarsTableFrameClass
If PhysicalTables is not Number
PhysicalTables:=0
If (PhysicalTables >= KeepOpen)
{
GuiControl,, Status, Set Full waiting
Return
}
OpenTables:=CountTourneys()
If OpenTables is not Number
OpenTables:=0
GuiControl, , OpenTables, Tables open/waiting: %OpenTables%
GuiControl, , RegSofar, SNG:s registered so far: %RegSofar%

If (RegSofar >= TotalLimit)
{
Gosub, ButtonPause
GuiControl, , cdown, SNG Total Limit reached
GuiControl, , Status, Status: Idle ;TEST
Return
}
If (OpenTables >= TotalLimit)
{
Gosub, ButtonPause
GuiControl, , cdown, SNG Total Limit reached
GuiControl, , Status, Status: Idle ;TEST
Return
}
If (OpenTables>=KeepOpen)
{
GuiControl, , OpenTables, Tables open/waiting: %OpenTables% (Set full)
GuiControl, , Status, Status: Waiting ;TEST
Return
}
Else
{
If (BatchReg=1)
{
Times:= KeepOpen - OpenTables
RegSNGexec(LobbyID, Times, scrldwn)
}
Else
{
RegSNGexec(LobbyID, 1, scrldwn)
}
}
Return

MakeIni:
IniWrite, %AutoIfFull%, %thisahk%.ini, Settings, AutoIfFull
IniWrite, %TopReturn%, %thisahk%.ini, Settings, TopReturn
IniWrite, %scrldwn%, %thisahk%.ini, Settings, scrldwn
IniWrite, %Lobby%, %thisahk%.ini, Settings, Lobby
IniWrite, %BatchReg%, %thisahk%.ini, Settings, BatchReg
IniWrite, %Setreg%, %thisahk%.ini, Settings, SetReg
IniWrite, %Minlob%, %thisahk%.ini, Settings, MinLob
IniWrite, %Interval1%, %thisahk%.ini, Settings, Interval1
IniWrite, %CloseInterv%, %thisahk%.ini, Settings, CloseInterv
IniWrite, %KeepOpen%, %thisahk%.ini, Settings, KeepOpen
IniWrite, %TotalLimit%, %thisahk%.ini, Settings, TotalLimit
IniWrite, %GuardTimer%, %thisahk%.ini, Settings, GuardTimer
IniWrite, %LimitTime%, %thisahk%.ini, Settings, LimitTime
Return

GetIni:
IfExist, %thisahk%.ini
{
IniRead, AutoIfFull, %thisahk%.ini, Settings, AutoIfFull
IniRead, TopReturn, %thisahk%.ini, Settings, TopReturn,0
IniRead, scrldwn, %thisahk%.ini, Settings, scrldwn
IniRead, Lobby, %thisahk%.ini, Settings, Lobby
IniRead, BatchReg, %thisahk%.ini, Settings, BatchReg
IniRead, SetReg, %thisahk%.ini, Settings, SetReg, 1
IniRead, MinLob, %thisahk%.ini, Settings, MinLob, 0
IniRead, Interval1, %thisahk%.ini, Settings, Interval1
IniRead, CloseInterv, %thisahk%.ini, Settings, CloseInterv
IniRead, KeepOpen, %thisahk%.ini, Settings, KeepOpen
IniRead, TotalLimit, %thisahk%.ini, Settings, TotalLimit
IniRead, GuardTimer, %thisahk%.ini, Settings, GuardTimer, Off
IniRead, LimitTime, %thisahk%.ini, Settings, LimitTime, Off
GuiControl, , AutoIfFull, %AutoIfFull%
StringReplace, ddlist7, ddlist7, %scrldwn%, %scrldwn%|
GuiControl, , scrldwn, |%ddlist7%
StringReplace, LobbyList, LobbyList, %Lobby%, %Lobby%|
GuiControl, , Lobby, |%LobbyList%
GuiControl, , BatchReg, %BatchReg%
GuiControl, , SetReg, %SetReg%
GuiControl, , MinLob, %MinLob%
GuiControl, , TopReturn, %TopReturn%
StringReplace, ddlist2, ddlist2, %interval1%, %Interval1%|
GuiControl, , Interval1, |%ddlist2%
StringReplace, ddlist6, ddlist6, %CloseInterv%, %CloseInterv%|
GuiControl, , CloseInterv, |%ddlist6%
StringReplace, ddlist, ddlist, %KeepOpen%, %KeepOpen%|
GuiControl, , KeepOpen, |%ddlist%
StringReplace, ddlist3, ddlist3, %TotalLimit%, %TotalLimit%|,
GuiControl, , TotalLimit, |%ddlist3%
StringReplace, ddlist4, ddlist4, %GuardTimer%, %GuardTimer%|
GuiControl, , GuardTimer, |%ddlist4%
StringReplace, ddlist5, ddlist5, %LimitTime%, %LimitTime%|
GuiControl, , LimitTime, |%ddlist5%
}
Return

#e::
gosub,NukeLobbies
Return

NukeLobbies:
SetTitleMatchMode, 2
GroupAdd, TLobbies, Lobby,,, PokerStars Lobby
GroupClose, TLobbies, A
Return

#H::
WinHide, %thisahk%
return

#S::
WinShow, %thisahk%
return

F11::
TmpSetReg:=SetReg
SetReg=0
CountTourneys()
SetReg:=TmpSetReg
Return
ManualCount:
CountTourneys()
Return


FindLobby:
If (%A_GuiEvent% = DoubleClick)
{
LV_GetText(TournId,A_EventInfo)
TournID:=SubStr(TournID, 1,10)
WinMenuSelectItem, PokerStars Lobby,, Requests, Find a Tournament
WinWait, Find Tournament ahk_class #32770, , 10
WinGet, fat, id
ControlFocus, Edit1, ahk_id%fat%
Sleep, -1
ControlSend, Edit1, %TournId%, ahk_id%fat%
ControlFocus, Button1, ahk_id%fat%
Sleep, -1
ControlSend, Button1, {Space}, ahk_id%fat%
}
Return

Donate:
donation()
Return

Format2Digits(_val) {
_val :=Round(_val) + 100
StringRight _val, _val, 2
Return _val
}

Format3Digits(_val) {
_val :=Round(_val) + 1000
StringRight _val, _val, 3
StringTrimRight, FirstZ, _val, 2
If FirstZ=0
{
StringTrimLeft, _val, _val, 1
}
StringTrimRight, FirstZ, _val, 1
If FirstZ=0
{
StringTrimLeft, _val, _val, 1
}
Return _val
}
LobbyRestore:
WinGet, lobbyid, id, PokerStars Lobby
WinShow, ahk_id%lobbyid%
WinMove, ahk_id%lobbyid%,,0,0
return


RegSNGexec(id, times, scrldwn) {
global RegSofar
global Register
global OpenTables
global KeepOpen
global TotalLimit
global RegButton
global AutoIfFull
Loop %times%
{
ControlSend, PokerStarsListClass2, {NumpadUp 20}, ahk_id%id%
If (OpenTables >= KeepOpen)
Exit
If (OpenTable >= TotalLimit)
Exit
ClickdirectionCount=0
direction=0
GuiControl, , Status, Status: Registering ;TEST
Loop 16
{
If (Register=0)
{
GuiControl, , Status, Status: Idle ;TEST
Exit
}
ControlGet, v, Visible, , %regButton%, ahk_id%id%
If (v = 0)
If (scrldwn!="Off")
{
If (ClickdirectionCount<scrldwn) {
If (direction=0) {
ControlSend, PokerStarsListClass2, {NumpadDown}, ahk_id%id%
} Else {
ControlSend, PokerStarsListClass2, {NumpadUp}, ahk_id%id%
}
ClickdirectionCount:=ClickdirectionCount+1
} Else {
If (direction=0) {
direction:=1
} Else {
direction:=0
}
ClickdirectionCount:=0
}
Sleep,1000
}


If ( v = 1 ) {
wingetclass,class,A
SetTitleMatchMode, 2
ControlSend, %regButton%, {Space}, ahk_id%id%
ControlSend, %regButton%, {Space}, ahk_id%id%
WinWait, Tournament Registration ahk_class #32770,,1
{
WinGet, regid, id, Tournament Registration ahk_class #32770
controlget,vis,visible,,OK,ahk_id%regid%
if vis
{
 If (AutoIfFull = 1)
 {
 ControlSend, Button2, {Space}, ahk_id%regid%
 Sleep, 30
 }
ControlSend, OK, {Space}, ahk_id%regid%
}
}
sleep,30
WinWait, Tournament Registration ahk_class #32770,,1
{
WinGet, regid, id, Tournament Registration ahk_class #32770
controlget,vis,visible,,OK,ahk_id%regid%
if !vis
ControlSend, PokerStarsButtonClass1, {Space}, ahk_id%regid%
}
GuiControl, , Status, Status: Waiting ;TEST
;if class=PokerStarsTableFrameClass
;winactivate,ahk_class PokerStarsTableFrameClass
Break
}
}
}
}
return

AutoReg:
AutoReg()
return

AutoReg()
{
global AutoIfFull
settitlematchmode,2
IfWinExist, Tournament Registration ahk_class #32770
{
winget,id,id,Tournament Registration ahk_class #32770
controlget,vis,visible,,OK,ahk_id%id%
if vis
{
If (AutoIfFull = 1)
{
;ControlFocus, Button2, ahk_id%id%
;Sleep, -1
ControlSend, Button2, {Space}, ahk_id%id%
Sleep, 30
}
ControlSend, OK, {Space}, ahk_id%id%
}
else
winclose,ahk_id%id%
;ControlSend, PokerStarsButtonClass1, {Space}, ahk_id%id%
}
}
return

CountTourneys(mode=0) {
global logfile
global RegSofar,regtourneys  ;,tables
If (SetReg=1)
{
Return 0
}
;if mode=0
;log := CheckFile(logfile)
;else
fileread,log, %logfile%
Loop, Parse, log, `n,
{
tnumber=
If ((instr(A_loopField,"TournFrame")>0) && !(instr(A_loopField,"~")>0)) || (instr(A_loopField,"RT add")>0)
{
 if instr(A_loopField,"TournFrame")>0
 {
 tnumber:=RegExReplace(A_loopField, "TournFrame '", "")
 stringleft,tnumber,tnumber,instr(tnumber,A_space)-2
 }
 else
 if instr(A_loopField,"RT add")>0 
 {
 tnumber:=RegExReplace(A_loopField, "RT add ", "")
 if instr(tnumber,A_space)
 StringLeft, tnumber, tnumber, instr(tnumber,A_space)-1
 }
 tnumber:=RegExReplace(tnumber, "[`n,`r]", "")
 if !instr(tables,tnumber)
 listadd(tables,tnumber)
}
else
If (instr(A_loopField,"RT remove")>0) || (instr(A_loopField,"~TournFrame")>0)
{
 if instr(A_loopField,"~TournFrame")>0
 {
 tnumber:=RegExReplace(A_loopField, "~TournFrame '", "")
 stringleft,tnumber,tnumber,instr(tnumber,A_space)-2
 }
 else
 if instr(A_loopField,"RT remove")>0
 stringtrimleft,tnumber,A_loopField,instr(A_loopField,A_space,"",0)
 tnumber:=RegExReplace(tnumber, "[`n,`r]", "")
 if instr(tables,tnumber)
 listDelItem(tables,tnumber)
}
}
log=
tcount:=0
Loop, Parse, tables, -,
{
if A_Loopfield is number
{
tcount++
if !(instr(regtourneys,A_Loopfield)>0)
{
listadd(regtourneys,A_Loopfield)
if mode=0
RegSofar++
}
}
}
return tcount
}

CheckFile(File) {
   ; THX Sean for File.ahk : http://www.autohotkey.com/forum/post-124759.html
   Static CF := ""   ; Current File
   Static FP := 0    ; File Pointer
   Static OPEN_EXISTING := 3
   Static GENERIC_READ := 0x80000000
   Static FILE_SHARE_READ := 1
   Static FILE_SHARE_WRITE := 2
   Static FILE_SHARE_DELETE := 4
   Static FILE_BEGIN := 0
   BatchLines := A_BatchLines
   SetBatchLines, -1
   If (File != CF) {
      CF := File
      FP := 0
   }
   hFile := DllCall("CreateFile"
                  , "Str",  File
                  , "Uint", GENERIC_READ
                  , "Uint", FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE
                  , "Uint", 0
                  , "Uint", OPEN_EXISTING
                  , "Uint", 0
                  , "Uint", 0)
   If (!hFile) {
      CF := ""
      FP := 0
      SetBatchLines, %BatchLines%
      Return False
   }
   DllCall("GetFileSizeEx"
         , "Uint",   hFile
         , "Int64P", nSize)
   If (FP = 0 Or nSize <= FP) {
      FP := nSize
      SetBatchLines, %BatchLines%
      DllCall("CloseHandle", "Uint", hFile) ; close file
     Return False
   }
   DllCall("SetFilePointerEx"
         , "Uint",  hFile
         , "Int64", FP
         , "Uint",  0
         , "Uint",  FILE_BEGIN)
   VarSetCapacity(Tail, Length := nSize - FP, 0)
   DllCall("ReadFile"
         , "Uint",  hFile
         , "Str",   Tail
         , "Uint",  Length
         , "UintP", Length
         , "Uint",  0)
   DllCall("CloseHandle", "Uint", hFile)
   VarSetCapacity(Tail, -1)
   FP := nSize
   SetBatchLines, %BatchLines%
   Return Tail
}


listAdd( byRef list, item, del="-" ) {
  list:=( list!="" ? ( list . del . item ) : item )
  return list
}

listDelItem( byRef list, item, del="-") {
  ifEqual, item,, return list
  list:=del . list . del
  StringReplace, list, list, %item%%del%
  StringTrimLeft, list, list, 1
  StringTrimRight, list, list, 1
  return list
}

donation() {
WinMenuSelectItem, PokerStars Lobby,, Requests, Transfer Funds...
WinWait, Transfer Funds ahk_class #32770, , 10
WinGet, tf, id
ControlFocus, Edit2, ahk_id%tf%
ControlSetText, Edit2, Attilio
ControlFocus, Edit1, ahk_id%tf%
Sleep, -1
ControlSetText, Edit1,
GuiControl, Disable, Donate
}

lobbyStars() {
SetTitleMatchMode 2
WinGet, id, id, PokerStars Lobby - ahk_class #32770
Return id
}
~^!Q::
ExitApp
Plz help me solve this problem.
AHK script:Stars Filtered SNG Opener Quote
12-21-2012 , 06:46 PM
herek, read posts 639-642.
AHK script:Stars Filtered SNG Opener Quote
12-21-2012 , 09:26 PM
Quote:
Originally Posted by Max1mums
herek, read posts 639-642.
yea works in classic lobby theme, but what i need to do to make it run at black 9hate classic)?
Quote:
Originally Posted by Max1mums
Check "Register" button and the tourney list classes using windowspy, i have "PokerStarsButtonClass12" and "PokerStarsListClass2".
Got the same -> posted my code above
AHK script:Stars Filtered SNG Opener Quote
12-21-2012 , 10:25 PM
herek, can't check it out unless someone with .eu client goes for the teamviewer session.
AHK script:Stars Filtered SNG Opener Quote
12-22-2012 , 02:21 AM
New script in #654 works for me after the update thanks Max

*Times to scroll down also works (.com client) so Hereks problem is more than likely due to his Eu client
AHK script:Stars Filtered SNG Opener Quote
12-22-2012 , 07:14 AM
Quote:
Originally Posted by Max1mums
herek, can't check it out unless someone with .eu client goes for the teamviewer session.
next week i can do TV sess, now i use prepaid internet and have limited transfer.
AHK script:Stars Filtered SNG Opener Quote
12-26-2012 , 12:51 PM
Hi, I used to use this program when it first came out. Now trying to get it working again. Got the version from #654 but I'm getting a "pokerstars lobby not found" message.
doenst matter if i use black theme or classic. I feel like this was addressed a long time ago but I cant find the post. (I'm not on a .com client)
AHK script:Stars Filtered SNG Opener Quote
12-26-2012 , 05:58 PM
MediumRoller, it works for the english client only, you have to be logged in.
AHK script:Stars Filtered SNG Opener Quote
12-26-2012 , 10:00 PM
Ok, I had and now have again the version from #608 but i could never get it to work either,
It just says Status: Registering, but never registers.
AHK script:Stars Filtered SNG Opener Quote
12-27-2012 , 12:52 AM
MediumRoller, because it is not the latest version posted, read several posts above.
AHK script:Stars Filtered SNG Opener Quote
12-27-2012 , 09:36 AM
Thanks for the replies, I have read the last few hundred posts, #608 and #654 seem to be the latest versions posted (654 being for an EU client). not sure where to look.
AHK script:Stars Filtered SNG Opener Quote
12-27-2012 , 03:15 PM
MediumRoller, i don't know how you read it, post 654 link is for the .com version, there is not any version for the .eu version at all, people have to use the classic lobby theme there to make it work. I said "read several posts" not hundreds.
AHK script:Stars Filtered SNG Opener Quote
12-27-2012 , 03:29 PM
for Pokerstars.EU people this should be work, it does for me
doesnt care which lobby theme should work for all


Code:
; Author:         Everlong@2p2 Code assembled from misc sources, thanks to _dave_, chris228, finnisher
; v.4.01
; added: option to atuobuyin if full, hide/show window
; fixed issue with skipping first sng in lobby 
; 4.0 version fixed by Max1mums 
#NoEnv
#SingleInstance, Force
SendMode Input
SetWorkingDir %A_ScriptDir%
SetBatchLines, -1
SetTitleMatchMode, 2
SetTimer, register, off
SetTimer, safeguard, off
StringTrimRight, thisahk, A_ScriptName, 4

IniRead, pspath, %thisahk%.ini, Settings, path
;;;;;;;;;;;SET YOUR pokerstars.log.0 file path here;;;;;;;;;;;;;;;
;;;;;;;;;;;eg logfile:="c:\Program Files\PokerStars.EU\pokerstars.log.0"
logfile:= pspath . "pokerstars.log.0"
IfNotExist %logfile%
{
 If A_OSVersion in WIN_VISTA
{		
IniWrite, %A_AppData%\PokerStars.EU\, %thisahk%.ini, Settings, path
IniRead, pspath, %thisahk%.ini, Settings, path 
logfile:= pspath . "pokerstars.log.0"
IfNotExist %logfile%
{
 StringGetPos,pos, pspath,Roaming
 StringLeft, pspath, pspath, %pos%
 pspath:=pspath . "Local\PokerStars.EU\"
 IniWrite, %pspath%, %thisahk%.ini, Settings, path
}
}
 Else							
 IniWrite, %ProgramFiles%\PokerStars.EU\, %thisahk%.ini, Settings, path
 IniRead, pspath, %thisahk%.ini, Settings, path
}
IfNotExist %logfile%
{
logfile:= pspath . "pokerstars.log.0"
IfNotExist %logfile%
msgbox, PokerStars.log.0 file path is incorrect, recheck the configuration
}
;==============================================================
tcount=0
RegSofar=0
OpenTables=0
trows=17
SysGet,mon, MonitorworkArea
fivesec=0
ft:=0
two=0
ddlist4=Off|
ddlist5=Off|
ddlist6=Off|
ddlist7=Off|
LobbyList=Default|Black|
ddlist2:=ddlist2 . 1 . "|"
ddlist2:=ddlist2 . 2 . "|"
Loop 100
{
two:=two+2
ddlist3:=ddlist3 . two . "|"
ddlist:=ddlist . A_index . "|"
If (A_index<51)
{
fivesec:=fivesec+5
ddlist2:=ddlist2 . fivesec . "|"
ddlist6:=ddlist6 . fivesec . "|"
If (A_index<22)
{
ddlist7:=ddlist7 . A_Index . "|"
If (A_index<16)
{
ddlist4:=ddlist4 . A_index . "|"
}
}
}
else
{
ft:=ft+15
ddlist5:=ddlist5 . ft . "|"
}
}
ddlist3:=ddlist3 . 9999 . "|"
Gosub, BuildGui
Return
;==============================================================
;==============================================================

BuildGui:
Gui, color, white
Gui, font, cOlive
Gui, add, tab, h340 w240, General|Advanced Settings
Gui, add, text, , Auto-register
Gui, add, Checkbox, yp xp+80 Check3 Checked-1 vRegister
Gui, add, text, yp xp+30, Reg. next if full?
Gui, add, Checkbox, yp xp+80 VAutoifFull


Gui, add, text,xp-190 yp+30 , Register every (sec):
Gui, add, DropDownList, w50 yp-5 xp+140  vInterval1, %ddlist2%
Gui, add, text, xp-140 yp+30, No of SNG:s to keep open:
Gui, add, DropDownList, w50 yp-5 xp+140 vKeepOpen , %ddlist%
Gui, add, text,xp-140 yp+30, Limit total SNG:s to:
Gui, add, DropDownList, w50 yp-5 xp+140 vTotalLimit , %ddlist3%
Gui, add, text,xp-140 yp+30, Limit total time to (min):
Gui, add, DropDownList, w50 yp-5 xp+140 vLimitTime , %ddlist5%

Gui, add, text, xp-140 yp+30 cred vcdown w200
Gui, add, text, xp  yp+30 w200 vRegSofar, SNG:s registered so far:
Gui, add, text,  w200 vOpenTables, Tables open/waiting:
Gui, add, text, w200 cRed vStatus, Status: Idle
Gui, add, Button, w68 ggetgui, &Submit+Run
Gui, add, text, xp+72 yp+5, (Autosaves your settings)
Gui, Add, Button, Disabled xp-72 yp+20 w48 h20 Center , &Resume
Gui, Add, Button, Disabled  w45 h20 yp xp+48 Center , &Pause
Gui, Add, Button, w80 h20 yp xp+45 Center globbyrestore, &Lobby restore
Gui, Add, Button, w45 h20 yp xp+80 gDonate, &Donate
Gui, tab, 2

Gui, add, Text, x25 y65 , Lobby Theme:
Gui, add, DropDownList, w65 yp-5 xp+140 vLobby, %LobbyList%
Gui, add, text,xp-140 yp+30 , Close lobbies every (sec):
Gui, add, DropDownList, w50 yp-5 xp+140  vCloseInterv, %ddlist6%
Gui, add, text, xp-140 yp+18 , (manually Close with ctrl+e)
Gui, add, text, yp+30, Disable if no user Input (min):
Gui, add, DropDownList, w50 yp-5 xp+140 vGuardtimer Choose1 , %ddlist4%
Gui, add, text, xp-140 yp+30 ,Batch-register?
Gui, add, Checkbox,yp xp+140 vBatchReg
Gui, add, text, yp+20 xp-140 ,SetReg* mode?
Gui, add, Checkbox,yp xp+140 vSetReg
Gui, add, text, yp+20 xp-140 ,Minimize lobby?
Gui, add, Checkbox,yp xp+140 vMinlob
Gui, add, Text, xp-140 yp+30, Times to scroll down:
Gui, add, DropDownList, w50 yp-5 xp+140 vscrldwn, %ddlist7%
Gui, add, Text, xp-140 yp+25, Always start at top of lobby?
Gui, add, Checkbox, yp xp+140 vTopReturn
Gui, show, w256, %thisahk%
WinGetPos, x, y, w, h, SFSO
;x:=monRight-w
;y:=monBottom-h
x:=monLeft
y:=monTop
Gosub, GetIni
Gui, show, x%x% y%y%, %thisahk%
Return

getgui:
GuiControl,, Register, -1
Register = 1
tcount:=0
Gui, Submit, NoHide
displayedTime=
If (lobby="Default")
{
regButton:="PokerStarsButtonClass12"
}
Else If (lobby="Black" or lobby="Custom*")
{
regButton:="PokerStarsButtonClass12"
}
Gosub, MakeIni
PausedTime:=LimitTime
Gosub, TimeLimit
interval:=interval1*1000

If interval is not Number
interval=off

If guardtimer is not Number
{
SetTimer, safeguard, off
}
Else
{
killtime:=guardtimer*60000
SetTimer, safeguard, 1000
}
if CloseInterv is not number
SetTimer, NukeLobbies, off
else
{
lobclose:=CloseInterv*1000
SetTimer, NukeLobbies, %lobclose%
}
register=1
sleep,-1
Gosub, ButtonResume
Return

Safeguard:
If (A_TimeIdle > killtime)
{
Gosub, ButtonPause
GuiControl, , cdown, Stopped  due to inactivity!!! %displayedTime%
}
Return

TimeLimit:
If LimitTime is Number
{
allowedMinutes := LimitTime
endTime := A_Now
endTime += %allowedMinutes%, Minutes
SetTimer, CountDown, 1000
}
Else
{
SetTimer, CountDown, off
sleep,-1
GuiControl, , cdown, Time Limit off
}
Return

Countdown:
remainingTime := endTime
EnvSub remainingTime, %A_Now%, Seconds
m := remainingTime // 60
s := Mod(remainingTime, 60)
displayedTime := Format3Digits(m) ":" Format2Digits(s)
GuiControl, , cdown, Running another (mm:ss): %displayedTime%
If (A_now > endTime)
{
SetTimer, Countdown, off
Gosub, ButtonPause
GuiControl, , cdown, Time Limit reached.
}
Return

GuiClose:
Gui, Submit
Gosub, MakeIni
ExitApp
Return

ButtonResume:
Gui, Submit, NoHide
GuiControl, Disable, &Resume
GuiControl, Enable, &Pause
if LimitTime is Number
If PausedTime is Number
LimitTime:=PausedTime
Gosub, TimeLimit
GuiControl, , Register, -1
Register:=1
settimer, AutoReg,37
tcount:=0
CountTourneys(1)
Gosub,Register
SetTimer, Register, %Interval%
sleep,-1
Return

ButtonPause:
Critical
Gui, Submit, NoHide
if LimitTime is Number
PausedTime:=remainingTime/60
Register:=0
settimer, AutoReg,off
SetTimer, Countdown, off
SetTimer, Register, off
GuiControl, Disable, Pause
GuiControl, Enable, Resume
GuiControl, , Register, 0
GuiControl, , cdown, Manually Paused %displayedTime%
GuiControl, , Status, Status: Waiting ;TEST
Return

Register:
SetTitleMatchMode, 2
WinGet, LobbyID, id, PokerStars Lobby - ahk_class #32770

If !LobbyID
{
Gosub, ButtonPause
GuiControl,, Status, Status: PokerStars Lobby not found
Gui, show, NoActivate, %thisahk%
Return
}
If (TopReturn=1)
{
ControlSend, PokerStarsListClass2, {NumpadUp 20}, ahk_id%lobbyid%
}
WinGet, PhysicalTables, list,Table ahk_class PokerStarsTableFrameClass
If PhysicalTables is not Number
PhysicalTables:=0
If (PhysicalTables >= KeepOpen)
{
GuiControl,, Status, Set Full waiting
Return
}
OpenTables:=CountTourneys()
If OpenTables is not Number
OpenTables:=0
GuiControl, , OpenTables, Tables open/waiting: %OpenTables%
GuiControl, , RegSofar, SNG:s registered so far: %RegSofar%

If (RegSofar >= TotalLimit)
{
Gosub, ButtonPause
GuiControl, , cdown, SNG Total Limit reached
GuiControl, , Status, Status: Idle ;TEST
Return
}
If (OpenTables >= TotalLimit)
{
Gosub, ButtonPause
GuiControl, , cdown, SNG Total Limit reached
GuiControl, , Status, Status: Idle ;TEST
Return
}
If (OpenTables>=KeepOpen)
{
GuiControl, , OpenTables, Tables open/waiting: %OpenTables% (Set full)
GuiControl, , Status, Status: Waiting ;TEST
Return
}
Else
{
If (BatchReg=1)
{
Times:= KeepOpen - OpenTables
RegSNGexec(LobbyID, Times, scrldwn)
}
Else
{
RegSNGexec(LobbyID, 1, scrldwn)
}
}
Return

MakeIni:
IniWrite, %AutoIfFull%, %thisahk%.ini, Settings, AutoIfFull
IniWrite, %TopReturn%, %thisahk%.ini, Settings, TopReturn
IniWrite, %scrldwn%, %thisahk%.ini, Settings, scrldwn
IniWrite, %Lobby%, %thisahk%.ini, Settings, Lobby
IniWrite, %BatchReg%, %thisahk%.ini, Settings, BatchReg
IniWrite, %Setreg%, %thisahk%.ini, Settings, SetReg
IniWrite, %Minlob%, %thisahk%.ini, Settings, MinLob
IniWrite, %Interval1%, %thisahk%.ini, Settings, Interval1
IniWrite, %CloseInterv%, %thisahk%.ini, Settings, CloseInterv
IniWrite, %KeepOpen%, %thisahk%.ini, Settings, KeepOpen
IniWrite, %TotalLimit%, %thisahk%.ini, Settings, TotalLimit
IniWrite, %GuardTimer%, %thisahk%.ini, Settings, GuardTimer
IniWrite, %LimitTime%, %thisahk%.ini, Settings, LimitTime
Return

GetIni:
IfExist, %thisahk%.ini
{
IniRead, AutoIfFull, %thisahk%.ini, Settings, AutoIfFull
IniRead, TopReturn, %thisahk%.ini, Settings, TopReturn,0
IniRead, scrldwn, %thisahk%.ini, Settings, scrldwn
IniRead, Lobby, %thisahk%.ini, Settings, Lobby
IniRead, BatchReg, %thisahk%.ini, Settings, BatchReg
IniRead, SetReg, %thisahk%.ini, Settings, SetReg, 1
IniRead, MinLob, %thisahk%.ini, Settings, MinLob, 0
IniRead, Interval1, %thisahk%.ini, Settings, Interval1
IniRead, CloseInterv, %thisahk%.ini, Settings, CloseInterv
IniRead, KeepOpen, %thisahk%.ini, Settings, KeepOpen
IniRead, TotalLimit, %thisahk%.ini, Settings, TotalLimit
IniRead, GuardTimer, %thisahk%.ini, Settings, GuardTimer, Off
IniRead, LimitTime, %thisahk%.ini, Settings, LimitTime, Off
GuiControl, , AutoIfFull, %AutoIfFull%
StringReplace, ddlist7, ddlist7, %scrldwn%, %scrldwn%|
GuiControl, , scrldwn, |%ddlist7%
StringReplace, LobbyList, LobbyList, %Lobby%, %Lobby%|
GuiControl, , Lobby, |%LobbyList%
GuiControl, , BatchReg, %BatchReg%
GuiControl, , SetReg, %SetReg%
GuiControl, , MinLob, %MinLob%
GuiControl, , TopReturn, %TopReturn%
StringReplace, ddlist2, ddlist2, %interval1%, %Interval1%|
GuiControl, , Interval1, |%ddlist2%
StringReplace, ddlist6, ddlist6, %CloseInterv%, %CloseInterv%|
GuiControl, , CloseInterv, |%ddlist6%
StringReplace, ddlist, ddlist, %KeepOpen%, %KeepOpen%|
GuiControl, , KeepOpen, |%ddlist%
StringReplace, ddlist3, ddlist3, %TotalLimit%, %TotalLimit%|,
GuiControl, , TotalLimit, |%ddlist3%
StringReplace, ddlist4, ddlist4, %GuardTimer%, %GuardTimer%|
GuiControl, , GuardTimer, |%ddlist4%
StringReplace, ddlist5, ddlist5, %LimitTime%, %LimitTime%|
GuiControl, , LimitTime, |%ddlist5%
}
Return

#e::
gosub,NukeLobbies
Return

NukeLobbies:
SetTitleMatchMode, 2
GroupAdd, TLobbies, Lobby,,, PokerStars Lobby
GroupClose, TLobbies, A
Return

#H::
WinHide, %thisahk%
return

#S::
WinShow, %thisahk%
return

F11::
TmpSetReg:=SetReg
SetReg=0
CountTourneys()
SetReg:=TmpSetReg
Return
ManualCount:
CountTourneys()
Return


FindLobby:
If (%A_GuiEvent% = DoubleClick)
{
LV_GetText(TournId,A_EventInfo)
TournID:=SubStr(TournID, 1,10)
WinMenuSelectItem, PokerStars Lobby,, Requests, Find a Tournament
WinWait, Find Tournament ahk_class #32770, , 10
WinGet, fat, id
ControlFocus, Edit1, ahk_id%fat%
Sleep, -1
ControlSend, Edit1, %TournId%, ahk_id%fat%
ControlFocus, Button1, ahk_id%fat%
Sleep, -1
ControlSend, Button1, {Space}, ahk_id%fat%
}
Return

Donate:
donation()
Return

Format2Digits(_val) {
_val :=Round(_val) + 100
StringRight _val, _val, 2
Return _val
}

Format3Digits(_val) {
_val :=Round(_val) + 1000
StringRight _val, _val, 3
StringTrimRight, FirstZ, _val, 2
If FirstZ=0
{
StringTrimLeft, _val, _val, 1
}
StringTrimRight, FirstZ, _val, 1
If FirstZ=0
{
StringTrimLeft, _val, _val, 1
}
Return _val
}
LobbyRestore:
WinGet, lobbyid, id, PokerStars Lobby
WinShow, ahk_id%lobbyid%
WinMove, ahk_id%lobbyid%,,0,0
return


RegSNGexec(id, times, scrldwn) {
global RegSofar
global Register
global OpenTables
global KeepOpen
global TotalLimit
global RegButton
global AutoIfFull
Loop %times%
{
ControlSend, PokerStarsListClass2, {NumpadUp 20}, ahk_id%id%
If (OpenTables >= KeepOpen)
Exit
If (OpenTable >= TotalLimit)
Exit
ClickdirectionCount=0
direction=0
GuiControl, , Status, Status: Registering ;TEST
Loop 16
{
If (Register=0)
{
GuiControl, , Status, Status: Idle ;TEST
Exit
}
ControlGet, v, Visible, , %regButton%, ahk_id%id%
If (v = 0)
If (scrldwn!="Off")
{
If (ClickdirectionCount<scrldwn) {
If (direction=0) {
ControlSend, PokerStarsListClass2, {NumpadDown}, ahk_id%id%
} Else {
ControlSend, PokerStarsListClass2, {NumpadUp}, ahk_id%id%
}
ClickdirectionCount:=ClickdirectionCount+1
} Else {
If (direction=0) {
direction:=1
} Else {
direction:=0
}
ClickdirectionCount:=0
}
Sleep,1000
}


If ( v = 1 ) {
wingetclass,class,A
SetTitleMatchMode, 2
ControlSend, %regButton%, {Space}, ahk_id%id%
ControlSend, %regButton%, {Space}, ahk_id%id%
WinWait, Tournament Registration ahk_class #32770,,1
{
WinGet, regid, id, Tournament Registration ahk_class #32770
controlget,vis,visible,,PokerStarsButtonClass2,ahk_id%regid%
if vis
{
 If (AutoIfFull = 1)
 {
 ControlSend, Button2, {Space}, ahk_id%regid%
 Sleep, 30
 }
ControlSend, PokerStarsButtonClass1, {Space}, ahk_id%regid%
}
}
sleep,30
WinWait, Tournament Registration ahk_class #32770,,1
{
WinGet, regid, id, Tournament Registration ahk_class #32770
controlget,vis,visible,,OK,ahk_id%regid%
if !vis
ControlSend, PokerStarsButtonClass1, {Space}, ahk_id%regid%
}
GuiControl, , Status, Status: Waiting ;TEST
;if class=PokerStarsTableFrameClass
;winactivate,ahk_class PokerStarsTableFrameClass
Break
}
}
}
}
return

AutoReg:
AutoReg()
return

AutoReg()
{
global AutoIfFull
settitlematchmode,2
IfWinExist, Tournament Registration ahk_class #32770
{
winget,id,id,Tournament Registration ahk_class #32770
controlget,vis,visible,,OK,ahk_id%id%
if vis
ControlSend, OK, {Space}, ahk_id%id%
else
{
controlget,vis,visible,,PokerStarsButtonClass2,ahk_id%id%
if vis
{
If (AutoIfFull = 1)
{
;ControlFocus, Button2, ahk_id%id%
;Sleep, -1
ControlSend, Button2, {Space}, ahk_id%id%
Sleep, 30
}
ControlSend, PokerStarsButtonClass1, {Space}, ahk_id%id%
}
else
winclose,ahk_id%id%
;ControlSend, PokerStarsButtonClass1, {Space}, ahk_id%id%
}
}
}
return

CountTourneys(mode=0) {
global logfile
global RegSofar,regtourneys  ;,tables
If (SetReg=1)
{
Return 0
}
;if mode=0
;log := CheckFile(logfile)
;else
fileread,log, %logfile%
Loop, Parse, log, `n,
{
tnumber=
If ((instr(A_loopField,"TournFrame")>0) && !(instr(A_loopField,"~")>0)) || (instr(A_loopField,"RT add")>0)
{
 if instr(A_loopField,"TournFrame")>0
 {
 tnumber:=RegExReplace(A_loopField, "TournFrame '", "")
 stringleft,tnumber,tnumber,instr(tnumber,A_space)-2
 }
 else
 if instr(A_loopField,"RT add")>0 
 {
 tnumber:=RegExReplace(A_loopField, "RT add ", "")
 if instr(tnumber,A_space)
 StringLeft, tnumber, tnumber, instr(tnumber,A_space)-1
 }
 tnumber:=RegExReplace(tnumber, "[`n,`r]", "")
 if !instr(tables,tnumber)
 listadd(tables,tnumber)
}
else
If (instr(A_loopField,"RT remove")>0) || (instr(A_loopField,"~TournFrame")>0)
{
 if instr(A_loopField,"~TournFrame")>0
 {
 tnumber:=RegExReplace(A_loopField, "~TournFrame '", "")
 stringleft,tnumber,tnumber,instr(tnumber,A_space)-2
 }
 else
 if instr(A_loopField,"RT remove")>0
 stringtrimleft,tnumber,A_loopField,instr(A_loopField,A_space,"",0)
 tnumber:=RegExReplace(tnumber, "[`n,`r]", "")
 if instr(tables,tnumber)
 listDelItem(tables,tnumber)
}
}
log=
tcount:=0
Loop, Parse, tables, -,
{
if A_Loopfield is number
{
tcount++
if !(instr(regtourneys,A_Loopfield)>0)
{
listadd(regtourneys,A_Loopfield)
if mode=0
RegSofar++
}
}
}
return tcount
}

CheckFile(File) {
   ; THX Sean for File.ahk : http://www.autohotkey.com/forum/post-124759.html
   Static CF := ""   ; Current File
   Static FP := 0    ; File Pointer
   Static OPEN_EXISTING := 3
   Static GENERIC_READ := 0x80000000
   Static FILE_SHARE_READ := 1
   Static FILE_SHARE_WRITE := 2
   Static FILE_SHARE_DELETE := 4
   Static FILE_BEGIN := 0
   BatchLines := A_BatchLines
   SetBatchLines, -1
   If (File != CF) {
      CF := File
      FP := 0
   }
   hFile := DllCall("CreateFile"
                  , "Str",  File
                  , "Uint", GENERIC_READ
                  , "Uint", FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE
                  , "Uint", 0
                  , "Uint", OPEN_EXISTING
                  , "Uint", 0
                  , "Uint", 0)
   If (!hFile) {
      CF := ""
      FP := 0
      SetBatchLines, %BatchLines%
      Return False
   }
   DllCall("GetFileSizeEx"
         , "Uint",   hFile
         , "Int64P", nSize)
   If (FP = 0 Or nSize <= FP) {
      FP := nSize
      SetBatchLines, %BatchLines%
      DllCall("CloseHandle", "Uint", hFile) ; close file
     Return False
   }
   DllCall("SetFilePointerEx"
         , "Uint",  hFile
         , "Int64", FP
         , "Uint",  0
         , "Uint",  FILE_BEGIN)
   VarSetCapacity(Tail, Length := nSize - FP, 0)
   DllCall("ReadFile"
         , "Uint",  hFile
         , "Str",   Tail
         , "Uint",  Length
         , "UintP", Length
         , "Uint",  0)
   DllCall("CloseHandle", "Uint", hFile)
   VarSetCapacity(Tail, -1)
   FP := nSize
   SetBatchLines, %BatchLines%
   Return Tail
}


listAdd( byRef list, item, del="-" ) {
  list:=( list!="" ? ( list . del . item ) : item )
  return list
}

listDelItem( byRef list, item, del="-") {
  ifEqual, item,, return list
  list:=del . list . del
  StringReplace, list, list, %item%%del%
  StringTrimLeft, list, list, 1
  StringTrimRight, list, list, 1
  return list
}

donation() {
WinMenuSelectItem, PokerStars Lobby,, Requests, Transfer Funds...
WinWait, Transfer Funds ahk_class #32770, , 10
WinGet, tf, id
ControlFocus, Edit2, ahk_id%tf%
ControlSetText, Edit2, Attilio
ControlFocus, Edit1, ahk_id%tf%
Sleep, -1
ControlSetText, Edit1,
GuiControl, Disable, Donate
}

lobbyStars() {
SetTitleMatchMode 2
WinGet, id, id, PokerStars Lobby - ahk_class #32770
Return id
}
~^!Q::
ExitApp
AHK script:Stars Filtered SNG Opener Quote
12-27-2012 , 08:04 PM
Sorry I'm losing my mind I guess, Though when you said "it works for the english client only" you meant England. I have no Idea why I said i'm not on a .com client in that post. So that brings me back to my original problem,

I am on the .com client
Using the 4.01 version from post #654 version it says "registering" and flashes "waiting"
but never registers for any tournaments.

doesnt matter which lobby theme I use

If I manually register for a tournament it does count it in the tables open/waiting section.
but it doesn't handle the "click ok to register" and "registered" pop ups.
AHK script:Stars Filtered SNG Opener Quote
12-27-2012 , 08:24 PM
MediumRoller, do you have the latest PokerStars client update installed?
AHK script:Stars Filtered SNG Opener Quote
12-28-2012 , 12:39 AM
seems not working properly at the latest client
AHK script:Stars Filtered SNG Opener Quote
12-28-2012 , 12:58 AM
yes, Running latest client
AHK script:Stars Filtered SNG Opener Quote

      
m