[UTILITY] AHK script:Stars Filtered SNG Opener
; ; AutoHotkey Version: 1.0.47.1 ; Language: English ; Platform: Win9x/NT ; Author: Everlong@2p2 Code assembled from misc sources, thanks to _dave_, chris228 ; ; Script Function: PokerStars SNG opener (for use with the tournament filter filtering a specific type of SNG/MTT-Sng) #NoEnv SendMode Input SetWorkingDir %A_ScriptDir% ;====================================================== #SingleInstance, Force SetTitleMatchMode, 2 Settimer, register, off SetTimer, safeguard, off RegSofar=0 OpenTables=0 Sysget,mon, MonitorworkArea fivesec=0 two=0 ddlist4=0ff| ddlist5=0ff| Loop 50 { fivesec:=fivesec+5 ddlist:=ddlist . A_index . "|" ddlist2:=ddlist2 . fivesec . "|" ddlist5:=ddlist5 . fivesec . "|" } Loop 100 { two:=two+2 ddlist3:=ddlist3 . two . "|" } Loop 15 { ddlist4:=ddlist4 . A_index . "|" } ;========================================================== Gui, add, checkbox, x10 vRegister Gui, add, text, yp xp+30, Auto-register Gui, add, text, x10, Close lobbies with Ctrl+E! Gui, add, text, yp+20 x10, Register every (sec): Gui, add, dropdownlist, w50 yp-5 xp+140 vInterval1, %ddlist2% Gui, add, text,x10, No of SNG:s to keep open: Gui, add, dropdownlist, w50 yp-5 xp+140 vKeepOpen , %ddlist% Gui, add, text,x10, Limit total SNG:s to: Gui, add, dropdownlist, w50 yp-5 xp+140 vTotalLimit , %ddlist3% Gui, add, text,x10, Limit total time to (min): Gui, add, dropdownlist, w50 yp-5 xp+140 vTimeLimit , %ddlist5% Gui, add, text,x10, Disable if no user input (min): Gui, add, dropdownlist, w50 yp-5 xp+140 vGuardtimer Choose1 , %ddlist4% Gui, add, text, x10 cred vcdown w200 Gui, add, text, x10 w200 vRegSofar, SNG:s registered so far: Gui, add, text, x10 w200 vOpenTables, Tables currently open: Gui, add, button, w68 gGetgui, &Submit+Run Gui, add, text, xp+72 yp+5, (Autosaves your settings) Gui, Add, Button, disabled x10 w56 h20 center, &Resume Gui, Add, Button, disabled w56 h20 yp xp+56 center, &Pause gui, show, NA , Stars Filtered SNG Opener WinGetPos, x, y, w, h, Stars Filtered SNG x:=monright-w y:=monbottom-h Gosub, Getini Gui, show, x%x% y%y%, SFSO 1.1 return ;=============================================================== getgui: Gui, submit, nohide displayedTime= Gosub, TimeLimit Gosub, MakeIni GuiControl, Enable, Pause GuiControl, Disable, Resume interval:=interval1*1000 if !interval interval=off if guardtimer is not number { SetTimer, safeguard, off } else { killtime:=guardtimer*60000 SetTimer, safeguard, 1000 } WinGet, OpenTables, list, ahk_class PokerStarsTableFrameClass if OpenTables is not number OpenTables=0 GuiControl, , OpenTables, Tables currently open: %OpenTables% GuiControl, , RegSofar, SNG:s registered so far: %RegSofar% Gui, show, noactivate, Stars Filtered SNG Opener if register=1 { gosub, register SetTimer, Register, %interval% } return Safeguard: if (A_TimeIdle > killtime) { gosub, ButtonPause GuiControl, , cdown, Stopped due to inactivity!!! %displayedTime% } return TimeLimit: if TimeLimit is number { allowedMinutes := timelimit endTime := A_Now endTime += %allowedMinutes%, Minutes SetTimer, CountDown, 1000 } else { 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 Format2Digits(_val) { _val += 100 StringRight _val, _val, 2 Return _val } Format3Digits(_val) { _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 } GuiClose: Gui, submit Gosub, MakeIni ExitApp return ^e:: SetTitleMatchMode, 2 GroupAdd, TLobbies, Lobby,,, PokerStars Lobby GroupClose, TLobbies, A return ;==================================================================== ButtonResume: Gui, submit, nohide if PausedTime is number { TimeLimit:=PausedTime } Gosub, TimeLimit GuiControl, Disable, Resume GuiControl, Enable, Pause GuiControl, , Register, 1 Register=1 gosub, register SetTimer, Register, %Interval% return ButtonPause: critical SetTimer, countdown, off Gui, submit, nohide PausedTime:=remainingTime/60 GuiControl, Disable, Pause GuiControl, Enable, Resume GuiControl, , Register, 0 GuiControl, , cdown, Manually paused %displayedTime% SetTimer, Register, off return ;===================================================================== Register: WinGet, OpenTables, list, ahk_class PokerStarsTableFrameClass if OpenTables is not number OpenTables=0 if (posOverlap=1) { SetTimer, Register, off Sleep 30000 posOverlap=0 SetTimer Register, on } GuiControl, , OpenTables, Tables currently open: %OpenTables% GuiControl, , RegSofar, SNG:s registered so far: %RegSofar% Gui, show, noactivate, Stars Filtered SNG Opener if (RegSofar >= TotalLimit) { Gosub, ButtonPause GuiControl, , cdown, SNG Total limit reached return } if (OpenTables >= TotalLimit) { Gosub, ButtonPause GuiControl, , cdown, SNG Total limit reached return return } if (KeepOpen - OpenTables = 1) { posOverlap=1 } if (OpenTables >= KeepOpen) { return } else { SettitleMatchmode, 2 WinGet, LobbyID, id, PokerStars Lobby if !LobbyID { return } RegSNGexec(LobbyID) } return MakeIni: iniwrite, %Register%, SFSO.ini, Settings, Register iniwrite, %Interval1%, SFSO.ini, Settings, Interval1 iniwrite, %KeepOpen%, SFSO.ini, Settings, KeepOpen iniwrite, %TotalLimit%, SFSO.ini, Settings, TotalLimit iniwrite, %GuardTimer%, SFSO.ini, Settings, GuardTimer iniwrite, %TimeLimit%, SFSO.ini, Settings, TimeLimit return GetIni: IfExist, SFSO.ini { IniRead, Register, SFSO.ini, Settings, Register IniRead, Interval1, SFSO.ini, Settings, Interval1 IniRead, KeepOpen, SFSO.ini, Settings, KeepOpen IniRead, TotalLimit, SFSO.ini, Settings, TotalLimit IniRead, GuardTimer, SFSO.ini, Settings, GuardTimer, Off IniRead, TimeLimit, SFSO.ini, Settings, TimeLimit, Off GuiControl, , Register, %register% StringReplace, ddlist2, ddlist2, %interval1%, %Interval1%| GuiControl, , Interval1, |%ddlist2% 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, %TimeLimit%, %TimeLimit%| GuiControl, , TimeLimit, |%ddlist5% } return RegSNGexec(id) { global RegSofar, Register Loop 16 { If Register=0 break ControlGet, v, Visible, , PokerStarsButtonClass6, ahk_id%id% if (v = 0) ControlSend, PokerStarsListClass5, {NumpadDown}, ahk_id%id% Sleep 1000 if (v = 1) break } if ( v = 1 ) { ControlClick, PokerStarsButtonClass6, ahk_id%id% WinWait, Tournament Registration ahk_class #32770, , 10 { WinGet, regid, id ControlFocus, Button1, ahk_id%regid% Sleep, -1 ControlSend, Button1, {SPACE}, ahk_id%regid% sleep, 10 ControlFocus, Button2, ahk_id%regid% Sleep, -1 ControlSend, Button2, {SPACE}, ahk_id%regid% RegSofar++ GuiControl, , RegSofar, SNG:s registered so far: %RegSofar% gui, show, noactivate, Stars Filtered SNG Opener } WinWait, Tournament Registration ahk_class #32770, , 10 { WinGet, regid, id ControlGetText, ctext, Button1, ahk_id%regid% if ( cText = "OK" ) { ControlFocus, Button1, ahk_id%regid% Sleep, -1 ControlSend, Button1, {SPACE}, ahk_id%regid% } } } } ;========================================================= ~^!Q:: ExitApp
; ; AutoHotkey Version: 1.0.47.1 ; Language: English ; Platform: Win9x/NT ; Author: Everlong@2p2 Code assembled from misc sources, thanks to _dave_, chris228 ; ; Script Function: PokerStars SNG opener (for use with the tournament filter filtering a specific type of SNG/MTT-Sng) #NoEnv SendMode Input SetWorkingDir %A_ScriptDir% ;====================================================== #SingleInstance, Force SetTitleMatchMode, 2 Settimer, register, off SetTimer, safeguard, off RegSofar=0 OpenTables=0 Sysget,mon, MonitorworkArea fivesec=0 two=0 ddlist4=0ff| ddlist5=0ff| Loop 50 { fivesec:=fivesec+5 ddlist:=ddlist . A_index . "|" ddlist2:=ddlist2 . fivesec . "|" ddlist5:=ddlist5 . fivesec . "|" } Loop 100 { two:=two+2 ddlist3:=ddlist3 . two . "|" } Loop 15 { ddlist4:=ddlist4 . A_index . "|" } ;========================================================== Gui, add, checkbox, x10 vRegister Gui, add, text, yp xp+30, Auto-register Gui, add, text, x10, Close lobbies with Ctrl+E! Gui, add, text, yp+20 x10, Register every (sec): Gui, add, dropdownlist, w50 yp-5 xp+140 vInterval1, %ddlist2% Gui, add, text,x10, No of SNG:s to keep open: Gui, add, dropdownlist, w50 yp-5 xp+140 vKeepOpen , %ddlist% Gui, add, text,x10, Limit total SNG:s to: Gui, add, dropdownlist, w50 yp-5 xp+140 vTotalLimit , %ddlist3% Gui, add, text,x10, Limit total time to (min): Gui, add, dropdownlist, w50 yp-5 xp+140 vTimeLimit , %ddlist5% Gui, add, text,x10, Disable if no user input (min): Gui, add, dropdownlist, w50 yp-5 xp+140 vGuardtimer Choose1 , %ddlist4% Gui, add, text, x10 cred vcdown w200 Gui, add, text, x10 w200 vRegSofar, SNG:s registered so far: Gui, add, text, x10 w200 vOpenTables, Tables currently open: Gui, add, button, w68 gGetgui, &Submit+Run Gui, add, text, xp+72 yp+5, (Autosaves your settings) Gui, Add, Button, disabled x10 w56 h20 center, &Resume Gui, Add, Button, disabled w56 h20 yp xp+56 center, &Pause gui, show, NA , Stars Filtered SNG Opener WinGetPos, x, y, w, h, Stars Filtered SNG x:=monright-w y:=monbottom-h Gosub, Getini Gui, show, x%x% y%y%, SFSO 1.1 return ;=============================================================== getgui: Gui, submit, nohide displayedTime= Gosub, TimeLimit Gosub, MakeIni GuiControl, Enable, Pause GuiControl, Disable, Resume interval:=interval1*1000 if !interval interval=off if guardtimer is not number { SetTimer, safeguard, off } else { killtime:=guardtimer*60000 SetTimer, safeguard, 1000 } WinGet, OpenTables, list, ahk_class PokerStarsTableFrameClass if OpenTables is not number OpenTables=0 GuiControl, , OpenTables, Tables currently open: %OpenTables% GuiControl, , RegSofar, SNG:s registered so far: %RegSofar% Gui, show, noactivate, Stars Filtered SNG Opener if register=1 { gosub, register SetTimer, Register, %interval% } return Safeguard: if (A_TimeIdle > killtime) { gosub, ButtonPause GuiControl, , cdown, Stopped due to inactivity!!! %displayedTime% } return TimeLimit: if TimeLimit is number { allowedMinutes := timelimit endTime := A_Now endTime += %allowedMinutes%, Minutes SetTimer, CountDown, 1000 } else { 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 Format2Digits(_val) { _val += 100 StringRight _val, _val, 2 Return _val } Format3Digits(_val) { _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 } GuiClose: Gui, submit Gosub, MakeIni ExitApp return ^e:: SetTitleMatchMode, 2 GroupAdd, TLobbies, Lobby,,, PokerStars Lobby GroupClose, TLobbies, A return ;==================================================================== ButtonResume: Gui, submit, nohide if PausedTime is number { TimeLimit:=PausedTime } Gosub, TimeLimit GuiControl, Disable, Resume GuiControl, Enable, Pause GuiControl, , Register, 1 Register=1 gosub, register SetTimer, Register, %Interval% return ButtonPause: critical SetTimer, countdown, off Gui, submit, nohide PausedTime:=remainingTime/60 GuiControl, Disable, Pause GuiControl, Enable, Resume GuiControl, , Register, 0 GuiControl, , cdown, Manually paused %displayedTime% SetTimer, Register, off return ;===================================================================== Register: WinGet, OpenTables, list, ahk_class PokerStarsTableFrameClass if OpenTables is not number OpenTables=0 if (posOverlap=1) { SetTimer, Register, off Sleep 30000 posOverlap=0 SetTimer Register, on } GuiControl, , OpenTables, Tables currently open: %OpenTables% GuiControl, , RegSofar, SNG:s registered so far: %RegSofar% Gui, show, noactivate, Stars Filtered SNG Opener if (RegSofar >= TotalLimit) { Gosub, ButtonPause GuiControl, , cdown, SNG Total limit reached return } if (OpenTables >= TotalLimit) { Gosub, ButtonPause GuiControl, , cdown, SNG Total limit reached return return } if (KeepOpen - OpenTables = 1) { posOverlap=1 } if (OpenTables >= KeepOpen) { return } else { SettitleMatchmode, 2 WinGet, LobbyID, id, PokerStars Lobby if !LobbyID { return } RegSNGexec(LobbyID) } return MakeIni: iniwrite, %Register%, SFSO.ini, Settings, Register iniwrite, %Interval1%, SFSO.ini, Settings, Interval1 iniwrite, %KeepOpen%, SFSO.ini, Settings, KeepOpen iniwrite, %TotalLimit%, SFSO.ini, Settings, TotalLimit iniwrite, %GuardTimer%, SFSO.ini, Settings, GuardTimer iniwrite, %TimeLimit%, SFSO.ini, Settings, TimeLimit return GetIni: IfExist, SFSO.ini { IniRead, Register, SFSO.ini, Settings, Register IniRead, Interval1, SFSO.ini, Settings, Interval1 IniRead, KeepOpen, SFSO.ini, Settings, KeepOpen IniRead, TotalLimit, SFSO.ini, Settings, TotalLimit IniRead, GuardTimer, SFSO.ini, Settings, GuardTimer, Off IniRead, TimeLimit, SFSO.ini, Settings, TimeLimit, Off GuiControl, , Register, %register% StringReplace, ddlist2, ddlist2, %interval1%, %Interval1%| GuiControl, , Interval1, |%ddlist2% 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, %TimeLimit%, %TimeLimit%| GuiControl, , TimeLimit, |%ddlist5% } return RegSNGexec(id) { global RegSofar, Register Loop 16 { If Register=0 break ControlGet, v, Visible, , PokerStarsButtonClass6, ahk_id%id% if (v = 0) ControlSend, PokerStarsListClass5, {NumpadDown}, ahk_id%id% Sleep 1000 if (v = 1) break } if ( v = 1 ) { ControlClick, PokerStarsButtonClass6, ahk_id%id% WinWait, Tournament Registration ahk_class #32770, , 10 { WinGet, regid, id ControlFocus, Button1, ahk_id%regid% Sleep, -1 ControlSend, Button1, {SPACE}, ahk_id%regid% sleep, 10 ControlFocus, Button2, ahk_id%regid% Sleep, -1 ControlSend, Button2, {SPACE}, ahk_id%regid% RegSofar++ GuiControl, , RegSofar, SNG:s registered so far: %RegSofar% gui, show, noactivate, Stars Filtered SNG Opener } WinWait, Tournament Registration ahk_class #32770, , 10 { WinGet, regid, id ControlGetText, ctext, Button1, ahk_id%regid% if ( cText = "OK" ) { ControlFocus, Button1, ahk_id%regid% Sleep, -1 ControlSend, Button1, {SPACE}, ahk_id%regid% } } } } ;========================================================= ~^!Q:: ExitApp
#NoEnv #Persistent #SingleInstance force #Include %a_scriptDir% #Include Functions.ahk F3:: ;__Reged in tourneys WinActivate, Pokerstars Lobby WinMenuSelectItem, PokerStars Lobby,, Requests, Registered In Tournaments WinWait, Registered In Tournaments WinActivate, Registered In Tournaments ControlGet, Kount, List,, ListBox1 ControlClick, Cancel b:=0 x:=0 Loop {StringGetPos, a, Kount, Hold,, b If %ErrorLevel%= 0 {x:=x + 1 b:=a + 2 } else break } #Persistent ToolTip, %x% SetTimer, RemoveToolTip, 4000 return
; ; AutoHotkey Version: 1.0.47.1 ; Language: English ; Platform: Win9x/NT ; Author: Everlong@2p2 Code assembled from misc sources, thanks to _dave_, chris228 ; ; Script Function: PokerStars SNG opener (for use with the tournament filter filtering a specific type of SNG/MTT-Sng) #NoEnv SendMode Input SetWorkingDir %A_ScriptDir% ;====================================================== #SingleInstance, Force SetTitleMatchMode, 2 Settimer, register, off SetTimer, safeguard, off RegSofar=0 OpenTables=0 Sysget,mon, MonitorworkArea fivesec=0 two=0 ddlist4=0ff| ddlist5=0ff| Loop 50 { fivesec:=fivesec+5 ddlist:=ddlist . A_index . "|" ddlist2:=ddlist2 . fivesec . "|" ddlist5:=ddlist5 . fivesec . "|" } Loop 100 { two:=two+2 ddlist3:=ddlist3 . two . "|" } Loop 15 { ddlist4:=ddlist4 . A_index . "|" } ;========================================================== Gui, add, checkbox, x10 vRegister Gui, add, text, yp xp+30, Auto-register Gui, add, text, x10, Close lobbies with Ctrl+E! Gui, add, text, yp+20 x10, Register every (sec): Gui, add, dropdownlist, w50 yp-5 xp+140 vInterval1, %ddlist2% Gui, add, text,x10, No of SNG:s to keep open: Gui, add, dropdownlist, w50 yp-5 xp+140 vKeepOpen , %ddlist% Gui, add, text,x10, Limit total SNG:s to: Gui, add, dropdownlist, w50 yp-5 xp+140 vTotalLimit , %ddlist3% Gui, add, text,x10, Limit total time to (min): Gui, add, dropdownlist, w50 yp-5 xp+140 vTimeLimit , %ddlist5% Gui, add, text,x10, Disable if no user input (min): Gui, add, dropdownlist, w50 yp-5 xp+140 vGuardtimer Choose1 , %ddlist4% Gui, add, text, x10 cred vcdown w200 Gui, add, text, x10 w200 vRegSofar, SNG:s registered so far: Gui, add, text, x10 w200 vOpenTables, Tables currently open: Gui, add, button, w68 gGetgui, &Submit+Run Gui, add, text, xp+72 yp+5, (Autosaves your settings) Gui, Add, Button, disabled x10 w56 h20 center, &Resume Gui, Add, Button, disabled w56 h20 yp xp+56 center, &Pause gui, show, NA , Stars Filtered SNG Opener WinGetPos, x, y, w, h, Stars Filtered SNG x:=monright-w y:=monbottom-h Gosub, Getini Gui, show, x%x% y%y%, SFSO 1.1 return ;=============================================================== getgui: Gui, submit, nohide displayedTime= Gosub, TimeLimit Gosub, MakeIni GuiControl, Enable, Pause GuiControl, Disable, Resume interval:=interval1*1000 if !interval interval=off if guardtimer is not number { SetTimer, safeguard, off } else { killtime:=guardtimer*60000 SetTimer, safeguard, 1000 } WinGet, OpenTables, list, ahk_class PokerStarsTableFrameClass if OpenTables is not number OpenTables=0 GuiControl, , OpenTables, Tables currently open: %OpenTables% GuiControl, , RegSofar, SNG:s registered so far: %RegSofar% Gui, show, noactivate, Stars Filtered SNG Opener if register=1 { gosub, register SetTimer, Register, %interval% } return Safeguard: if (A_TimeIdle > killtime) { gosub, ButtonPause GuiControl, , cdown, Stopped due to inactivity!!! %displayedTime% } return TimeLimit: if TimeLimit is number { allowedMinutes := timelimit endTime := A_Now endTime += %allowedMinutes%, Minutes SetTimer, CountDown, 1000 } else { 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 Format2Digits(_val) { _val += 100 StringRight _val, _val, 2 Return _val } Format3Digits(_val) { _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 } GuiClose: Gui, submit Gosub, MakeIni ExitApp return ^e:: SetTitleMatchMode, 2 GroupAdd, TLobbies, Lobby,,, PokerStars Lobby GroupClose, TLobbies, A return ;==================================================================== ButtonResume: Gui, submit, nohide if PausedTime is number { TimeLimit:=PausedTime } Gosub, TimeLimit GuiControl, Disable, Resume GuiControl, Enable, Pause GuiControl, , Register, 1 Register=1 gosub, register SetTimer, Register, %Interval% return ButtonPause: critical SetTimer, countdown, off Gui, submit, nohide PausedTime:=remainingTime/60 GuiControl, Disable, Pause GuiControl, Enable, Resume GuiControl, , Register, 0 GuiControl, , cdown, Manually paused %displayedTime% SetTimer, Register, off return ;===================================================================== Register: WinGet, OpenTables, list, ahk_class PokerStarsTableFrameClass if OpenTables is not number OpenTables=0 if (posOverlap=1) { SetTimer, Register, off Sleep 30000 posOverlap=0 SetTimer Register, on } GuiControl, , OpenTables, Tables currently open: %OpenTables% GuiControl, , RegSofar, SNG:s registered so far: %RegSofar% Gui, show, noactivate, Stars Filtered SNG Opener if (RegSofar >= TotalLimit) { Gosub, ButtonPause GuiControl, , cdown, SNG Total limit reached return } if (OpenTables >= TotalLimit) { Gosub, ButtonPause GuiControl, , cdown, SNG Total limit reached return return } if (KeepOpen - OpenTables = 1) { posOverlap=1 } if (OpenTables >= KeepOpen) { return } else { SettitleMatchmode, 2 WinGet, LobbyID, id, PokerStars Lobby if !LobbyID { return } RegSNGexec(LobbyID) } return MakeIni: iniwrite, %Register%, SFSO.ini, Settings, Register iniwrite, %Interval1%, SFSO.ini, Settings, Interval1 iniwrite, %KeepOpen%, SFSO.ini, Settings, KeepOpen iniwrite, %TotalLimit%, SFSO.ini, Settings, TotalLimit iniwrite, %GuardTimer%, SFSO.ini, Settings, GuardTimer iniwrite, %TimeLimit%, SFSO.ini, Settings, TimeLimit return GetIni: IfExist, SFSO.ini { IniRead, Register, SFSO.ini, Settings, Register IniRead, Interval1, SFSO.ini, Settings, Interval1 IniRead, KeepOpen, SFSO.ini, Settings, KeepOpen IniRead, TotalLimit, SFSO.ini, Settings, TotalLimit IniRead, GuardTimer, SFSO.ini, Settings, GuardTimer, Off IniRead, TimeLimit, SFSO.ini, Settings, TimeLimit, Off GuiControl, , Register, %register% StringReplace, ddlist2, ddlist2, %interval1%, %Interval1%| GuiControl, , Interval1, |%ddlist2% 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, %TimeLimit%, %TimeLimit%| GuiControl, , TimeLimit, |%ddlist5% } return RegSNGexec(id) { global RegSofar, Register Loop 16 { If Register=0 break ControlGet, v, Visible, , PokerStarsButtonClass7, ahk_id%id% if (v = 0) ControlSend, PokerStarsListClass5, {NumpadDown}, ahk_id%id% Sleep 1000 if (v = 1) break } if ( v = 1 ) { ControlClick, PokerStarsButtonClass7, ahk_id%id% WinWait, Tournament Registration ahk_class #32770, , 10 { WinGet, regid, id ControlFocus, Button1, ahk_id%regid% Sleep, -1 ControlSend, Button1, {SPACE}, ahk_id%regid% sleep, 10 ControlFocus, Button2, ahk_id%regid% Sleep, -1 ControlSend, Button2, {SPACE}, ahk_id%regid% RegSofar++ GuiControl, , RegSofar, SNG:s registered so far: %RegSofar% gui, show, noactivate, Stars Filtered SNG Opener } WinWait, Tournament Registration ahk_class #32770, , 10 { WinGet, regid, id ControlGetText, ctext, Button1, ahk_id%regid% if ( cText = "OK" ) { ControlFocus, Button1, ahk_id%regid% Sleep, -1 ControlSend, Button1, {SPACE}, ahk_id%regid% } } } } ;========================================================= ~^!Q:: ExitApp