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

09-10-2008 , 07:29 AM
report of batch-register spazzing out recieved. use with caution I will look into why etc
AHK script:Stars Filtered SNG Opener Quote
09-10-2008 , 08:05 AM
uploaded 3.0.7 to overcards http://overcards.com/wiki/moin.cgi/SFSO
- annyoing register for idenctical sng dialog now dealt with (will not check the box just buyin)
- attempt at fixing spazzaments by batch-register

Last edited by Everlong; 09-10-2008 at 08:24 AM.
AHK script:Stars Filtered SNG Opener Quote
09-11-2008 , 05:05 AM
Couple of things I noticed after testing it more. The auto batch seems better but still acts strange with the amount it attempts to register although it almost never went over the limit except one time it went one over.

When it goes to register in a new one, can we make the cursor scroll to the top before it registers because it often registers in the 2nd or 3rd highest one for me.

also what about adding something like he was talking about here

Quote:
Originally Posted by rookiepsu
Everlong, I hope you don't mind but I've made some tweaks to your code. Great job by the way. One issue I was having was once the script scrolls to the bottom of the SNG list, it stays there. I like to play a mix of different SNGs, so I changed the script to keep inverting the scroll. I have it set up to scroll 5 in each direction, so if your filters are more broad than mine, you'll have to change the code at the bottom to increase that.

If anyone has any suggestions they'd like to see added, I'm willing to give a crack at them until Everlong is able to get back to it.

Code:
;
; 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%
;======================================================
SetTitleMatchMode, 2
Settimer, register, off
SetTimer, safeguard, off
RegSofar=0
OpenTables=0
Sysget,mon, MonitorworkArea
fivesec=0
two=0
ddlist4=0|
Loop 48
{
fivesec:=fivesec+5

ddlist:=ddlist . A_index . "|"
ddlist2:=ddlist2 . fivesec . "|"

}

Loop 100
{
two:=two+2
ddlist3:=ddlist3 . two . "|"
}

Loop 15
{
ddlist4:=ddlist4 . A_index . "|"
}


Gui, add, checkbox, x10 gToggleRegister
Gui, add, text, yp xp+30, Auto-register for filtered SNG:?
Gui, add, text, x10, Close lobbies with Ctrl+E!
Gui, add, text, yp+20 x10, Register every:
Gui, add, dropdownlist, w60 yp-5 xp+80  vInterval1, %ddlist2%
Gui, add, text, xp+70 yp+3, seconds
Gui, add, text,x10, No of SNG:s to keep open:
Gui, add, dropdownlist, w40 yp-5 xp+140 vKeepOpen , %ddlist% 
Gui, add, text,x10, Limit total SNG:s to:
Gui, add, dropdownlist, w40 yp-5 xp+140 vTotalLimit , %ddlist3% 
Gui, add, text,x10, Disable if no user input (min):
Gui, add, dropdownlist, w40 yp-5 xp+140 vguardtimer , %ddlist4% 
Gui, add, text, x10 w200 vRegSofar, SNG:s registered so far:   
Gui, add, text, x10 w200 vOpenTables, SNG:s currently open:   
Gui, add, button, gGetgui, &Submit settings
Gui, Add, Button, vOn disabled x10 w56 h20 center, &Resume
Gui, Add, Button, vOff  w56 h20 yp xp+56 center, &Pause
Gui, +toolwindow
gui, show, , Stars Filtered SNG Opener
WinGetPos, x, y, w, h, Stars Filtered SNG
x:=monright-w
y:=monbottom-h
Gui, show, x%x% y%y%, Stars Filtered SNG Opener
return


ToggleRegister:
if register!=1
{
register=1
}
else
{
register=0
}
return


getgui:
Gui, submit, nohide
interval:=interval1*1000
killtime:=guardtimer*60000
if !interval
interval=off

if guardtimer=0
{
SetTimer, safeguard, off
}
else
{
SetTimer, safeguard, 10000
}

WinGet, OpenTables, list, ahk_class PokerStarsTableFrameClass
if OpenTables is not number
OpenTables=0

GuiControl, , OpenTables, SNG:s 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_TimeIdlePhysical > killtime)
gosub, ButtonPause
return

GuiClose:
ExitApp
return

^e::
SetTitleMatchMode, 2
WinGet, lobbylist, list, Lobby, , PokerStars Lobby
Loop % lobbylist
{
i:=lobbylist%A_index%
WinClose, ahk_id%i%
}
return
;====================================================================
ButtonResume:
Gui, submit, nohide
  GuiControl, 1:Disable, Resume
  GuiControl, 1:Enable, Pause
Register=1
gosub, register
SetTimer, Register, %Interval%

return
  
ButtonPause:
  GuiControl, 1:Disable, Pause
  GuiControl, 1:Enable, Resume
Register=0
SetTimer, Register, off

return
;=====================================================================
Register:
critical
WinGet, OpenTables, list, ahk_class PokerStarsTableFrameClass
if OpenTables is not number
OpenTables=0

GuiControl, , OpenTables, SNG:s currently open: %OpenTables%
GuiControl, , RegSofar, SNG:s registered so far: %RegSofar%
Gui, show, noactivate, Stars Filtered SNG Opener
if (RegSofar >= TotalLimit)
{
return
}
if (OpenTables >= TotalLimit)
{
return
}
if (OpenTables >= KeepOpen)
{
return
}
else
{
SettitleMatchmode, 2
  WinGet, LobbyID, id, PokerStars Lobby

  RegSNGexec(LobbyID)
  }
return

RegSNGexec(id) {
global RegSofar
clickdirectioncount=0
direction=0
Loop 16
{
  ControlGet, v, Visible, , PokerStarsButtonClass7, ahk_id%id%
  if (v = 0)
  if (clickdirectioncount<=5) {
    if (direction=0) {
       ControlSend, PokerStarsListClass5, {NumpadDown}, ahk_id%id%
    } else {
       ControlSend, PokerStarsListClass5, {NumpadUp}, ahk_id%id%    
    }
    clickdirectioncount:=clickdirectioncount+1
  } else {
    if (direction=0) {
	direction:=1
    } else {
        direction:=0
    }
    clickdirectioncount:=0
  }
  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
Itd be nice to have a function where it scrolls more randomly so it could attempt to mix up the buy ins instead of going straight down in a line from the top so in case there is a big ling of 55s, but you want to play some 55s, some 27s and some 16s it may just register in all 55s if the line is long enough. It will probably come out even in most cases but some kind of more random scrolling option could make that work.

other than that though it is working great!
AHK script:Stars Filtered SNG Opener Quote
09-11-2008 , 05:24 AM
The up/down scrolling is already in there. I will look at it starting from the top. Randomness will be kinda iffy to add I think.

I will standby for more reports on registering past limits. How this is possible is beyond me but maybe we can pinpoint the problem if more users experience it.

edit. 3.0.8 uploaded - registration now always starts from row one

Last edited by Everlong; 09-11-2008 at 05:41 AM.
AHK script:Stars Filtered SNG Opener Quote
09-16-2008 , 04:22 AM
added an alternative version which doesnt minimize stars lobby

also

MAKE SURE TO HAVE Auto-Open SNG lobbies unchecked in Advance -multi-table options!!!!!!!!!!!!
AHK script:Stars Filtered SNG Opener Quote
10-11-2008 , 08:32 AM
does it work with double or nothing?

maybe a bug but can t find them
AHK script:Stars Filtered SNG Opener Quote
10-11-2008 , 01:44 PM
I was able to load a set of DoN's earlier no problem. I'm still using version 2. SFSO
AHK script:Stars Filtered SNG Opener Quote
10-11-2008 , 07:02 PM
I just started using this script today and it worked for the DoNs just fine. Only had one issue. I was trying to play a 'set' of 10 tourneys 4 at a time and around the 8th the total counter incremented too many. When I only was on my seventh tourney (including the four currently running at the time) the counter said 8 and so although the script said it went to ten and stopped, it had really stopped at nine. I checked and made sure it hadn't registered me for another and it had not. Just the counter was wrong.

Anybody know why or how to fix it? I think it happened when I quickly went from four to two simultaneous within the 60 second increment that the script was set to check if another needed to be opened but I'm not 100% sure on that.
AHK script:Stars Filtered SNG Opener Quote
10-16-2008 , 06:25 AM
Everlong,

Great script.

Can it be minimized to the system tray? I have been playing a bazillion tables at a time and one less thing on the task bar the better. If it can't be minimized, consider this a feature request for the next time you are tinkering around with this wonderful program. Thanks.

2TB
AHK script:Stars Filtered SNG Opener Quote
10-16-2008 , 07:17 AM
Quote:
Originally Posted by malloc
I just started using this script today and it worked for the DoNs just fine. Only had one issue. I was trying to play a 'set' of 10 tourneys 4 at a time and around the 8th the total counter incremented too many. When I only was on my seventh tourney (including the four currently running at the time) the counter said 8 and so although the script said it went to ten and stopped, it had really stopped at nine. I checked and made sure it hadn't registered me for another and it had not. Just the counter was wrong.

Anybody know why or how to fix it? I think it happened when I quickly went from four to two simultaneous within the 60 second increment that the script was set to check if another needed to be opened but I'm not 100% sure on that.
I am currently not improving the limits function. Aware that it is not 100% but honestly I cant pinpoint what is wrong and it's "good enough".


Quote:
Originally Posted by 2tonbobby
Everlong,

Great script.

Can it be minimized to the system tray? I have been playing a bazillion tables at a time and one less thing on the task bar the better. If it can't be minimized, consider this a feature request for the next time you are tinkering around with this wonderful program. Thanks.

2TB
Thanks. It can't be min to tray right now but I will look into adding this for coming versions.
AHK script:Stars Filtered SNG Opener Quote
10-17-2008 , 11:00 PM
Im running this on vista..and It opens the lobby and never registers...I did run it as admin. The other scripts like starshotkey/debustifier do work, if that matters.
I have only the first 2 options checked on Advanced Multi-Table options;

Popup table whenever user action is required and
Single click table activation

The last 2 are unchecked.

Also I have tried using both 3.0.8.ahk and 3.0.8a.ahk

Thanks,

-DonkvFish

Last edited by DonkvFish; 10-17-2008 at 11:30 PM.
AHK script:Stars Filtered SNG Opener Quote
10-17-2008 , 11:15 PM
This is a new computer and it has 2 program files... one is Program Files the other is Program Files (x86).......i installed Stars on Program Files..


Im using DC theme if it matters....ill post the link below of the one im using

http://www.deucescracked.com/forums/...E-SKINS?page=3

Last edited by DonkvFish; 10-17-2008 at 11:44 PM.
AHK script:Stars Filtered SNG Opener Quote
10-18-2008 , 02:05 AM
Are you running the Black Lobby? (It has to be tweaked in a couple places to work with the default (old) lobby)
AHK script:Stars Filtered SNG Opener Quote
10-18-2008 , 02:20 AM
No, Im not...ill try it right now
AHK script:Stars Filtered SNG Opener Quote
10-18-2008 , 02:25 AM
Its working with the black lobby .....sigh I spent the whole day trying to figure this out thinking it had to do with the program file thing etc.

Thank You !
AHK script:Stars Filtered SNG Opener Quote
10-18-2008 , 03:31 AM
To work with standard old lobby replace all instances of PokerStarsButtonClass8 with PokerStarsButtonClass7 in the script, I'll add a simple setting for this in the next version.
AHK script:Stars Filtered SNG Opener Quote
10-23-2008 , 09:47 PM
Yo this is the error I get when trying to load it

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: Could not find file 'C:\Users\Michael\AppData\Local\Temp\Rar$EX00.150\ PokerStars.log.0'.
File name: 'C:\Users\Michael\AppData\Local\Temp\Rar$EX00.150\ PokerStars.log.0'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Project1.Form1.Timer1_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndPr oc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Debustifier
Assembly Version: 1.0.3129.6971
Win32 Version: 1.0.3129.6971
CodeBase: file:///C:/Users/Michael/AppData/Local/Temp/Rar$EX00.150/Debustifier.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.1434 (REDBITS.050727-1400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
AHK script:Stars Filtered SNG Opener Quote
10-24-2008 , 03:24 AM
I am pretty sure this is unrelated to SFSO, probably an error from Debustifier, please take it to that thread for support.
AHK script:Stars Filtered SNG Opener Quote
10-27-2008 , 06:36 PM
I thought this was working OK until I realized it registered me for more than my set of 10 SNGs. wouldn't have been a big deal, except it didn't pop up those screens so I ended up sitting out and wasting buy ins.
AHK script:Stars Filtered SNG Opener Quote
10-27-2008 , 07:56 PM
make sure stars doesnt open your lobbies. that's when the tables occasionally don't get opened.
AHK script:Stars Filtered SNG Opener Quote
10-28-2008 , 10:03 AM
Quote:
Originally Posted by Everlong
make sure stars doesnt open your lobbies. that's when the tables occasionally don't get opened.
What happens is it will occasionally freeze on the confirm buy-in screen (where there is an empty bubble for the buyin and an empty checkbox for 'automatically register for next tournament if full'). If I manually click those boxes and hit OK, a lobby pops up. When I minimize that lobby, the script seems to resume working properly. But I'm guessing that SNG I registered for somehow gets lost and never appears...
AHK script:Stars Filtered SNG Opener Quote
11-02-2008 , 03:59 PM
This doesn't work with a mac, does it? If it does, what application do I open it with? If not, is there anything like this for mac?
AHK script:Stars Filtered SNG Opener Quote
11-04-2008 , 07:44 AM
no, and i dont think so.
AHK script:Stars Filtered SNG Opener Quote
11-06-2008 , 09:05 AM
How do you download this script? I clicked on the link but it pulls up the actual script. Ive never worked with an ahk before so this is new to me. Thanks.
AHK script:Stars Filtered SNG Opener Quote
11-06-2008 , 09:06 AM
RightClick save to file. You have installed the AHK main application right? www. autohotkey.com
AHK script:Stars Filtered SNG Opener Quote

      
m