Two Plus Two Publishing LLC Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > > >

General Software Discussion Discussions about gambling-related and poker software.

Reply
 
Thread Tools Display Modes
Old 02-09-2009, 09:28 PM   #1
feint06
adept
 
feint06's Avatar
 
Join Date: Jun 2007
Location: far norcal
Posts: 969
software to automatically request missing tournament summaries (stars)

Has anyone made a script or program that allows you to paste a list of tournament ids needing tournament summaries, and then it goes and requests each tournament history from stars?
feint06 is offline   Reply With Quote
Old 02-10-2009, 12:38 PM   #2
feint06
adept
 
feint06's Avatar
 
Join Date: Jun 2007
Location: far norcal
Posts: 969
Re: software to automatically request missing tournament summaries (stars)

bump with diminishing hope...
feint06 is offline   Reply With Quote
Old 02-13-2009, 05:34 PM   #3
Mark1978
adept
 
Join Date: Jul 2005
Location: 45 man turbos
Posts: 855
Re: software to automatically request missing tournament summaries (stars)

Code:
#SingleInstance, Force
#Persistent
#NoEnv


Gui, Add, Edit, H200 W200
Gui, Add, Button, w56 h20 gGo, &Go
gui, show,, Tournament Summary Requester

return

Go:
ControlGetText, Tourn_List, Edit1, Tournament Summary Requester
Loop, parse, Tourn_List, `n, `r
{
WinMenuSelectItem, PokerStars Lobby,, Requests, Tournament History...
WinWait, Tournament History ahk_class #32770, , 10
loop 
{
Enabled = 0
ControlGet, Enabled, Enabled, , Edit2, Tournament History
IF (Enabled == 0)
	ControlClick, Button2, Tournament History
ELSE
	break
sleep, 1000
}
sleep, 1000
ControlSetText, Edit2, %A_LoopField%, Tournament History
sleep, 1000
ControlClick, Button4, Tournament History
WinWait, PokerStars ahk_class #32770,,PokerStars Lobby
sleep, 1000
ControlClick, Button1, PokerStars ahk_class #32770,,,,PokerStars Lobby
}
MsgBox, Done!
return
Mark1978 is offline   Reply With Quote
Old 02-13-2009, 06:13 PM   #4
Mark1978
adept
 
Join Date: Jul 2005
Location: 45 man turbos
Posts: 855
Re: software to automatically request missing tournament summaries (stars)

You can get a list of tourneys needing summaries from PT3 with this SQL script.
Code:
select distinct  tourney_holdem_summary.tourney_no
 from tourney_holdem_summary
where id_table_type = 0
Mark1978 is offline   Reply With Quote
Old 02-14-2009, 02:06 PM   #5
feint06
adept
 
feint06's Avatar
 
Join Date: Jun 2007
Location: far norcal
Posts: 969
Re: software to automatically request missing tournament summaries (stars)

Awesome!!! thanks
feint06 is offline   Reply With Quote
Old 02-15-2009, 10:10 AM   #6
Palsh
newbie
 
Join Date: Oct 2008
Location: Leverkusen, Germany
Posts: 30
Re: software to automatically request missing tournament summaries (stars)

Quote:
Originally Posted by Mark1978 View Post
You can get a list of tourneys needing summaries from PT3 with this SQL script.
Code:
select distinct  tourney_holdem_summary.tourney_no
 from tourney_holdem_summary
where id_table_type = 0
If I may,

Code:
SELECT tourney_holdem_summary.tourney_no as "tourney_no"
FROM tourney_holdem_summary WHERE
  ((SELECT sum(val_finish)
  FROM tourney_holdem_results thr WHERE
    thr.id_tourney = tourney_holdem_summary.id_tourney) = 0)
  AND tourney_holdem_summary.id_site in (100)
ORDER BY tourney_no DESC;
restricts the results to tourneys from PokerStars where no result has yet been entered. It puts the most recent ones (those with the highest tourney_no) on top.
I'm not 100% sure if id_site 100 is always PS, if it does not work do a

Code:
select * from lookup_sites;
and use id found there as id_site.

Regards
Palsh
Palsh is offline   Reply With Quote
Old 02-16-2009, 06:31 PM   #7
Palsh
newbie
 
Join Date: Oct 2008
Location: Leverkusen, Germany
Posts: 30
Re: software to automatically request missing tournament summaries (stars)

Hey Mark,

is there a way to check if a request is still running in the client? The AHK skips a lot of the tourney numbers because the Requests->Tournament History is greyed out during a running request and some requests take a while.

Props though for the script, I bought PT3 early this year and still have to request more than a year's worth of tourney histories, so this is obviously very helpful.

Regards
Palsh

Edit: I think I found it, WinWait does not seem to relly wait if the "Seconds" parameter is omitted. So I changed
Code:
WinWait, PokerStars ahk_class #32770,,PokerStars Lobby
at the bottom of the script to
Code:
WinWait, PokerStars ahk_class #32770,,60,PokerStars Lobby
Obviously if one request takes more than a minute this will fail for the next tourney numbers, but it seems to be much more robust.

Last edited by Palsh; 02-16-2009 at 07:00 PM. Reason: Found it myself
Palsh is offline   Reply With Quote
Old 02-17-2009, 02:26 AM   #8
Mark1978
adept
 
Join Date: Jul 2005
Location: 45 man turbos
Posts: 855
Re: software to automatically request missing tournament summaries (stars)

Palsh,

Winwait should wait indefinitely with no time supplied.
AHK documentation

I think the problem is with not pausing before testing for the 'email has been sent' message window. The script sees the tourn history window before it closes and just continues. Try this:

Code:
#SingleInstance, Force
#Persistent
#NoEnv

; Create the gui
Gui, Add, Edit, H200 W200
Gui, Add, Button, w56 h20 gGo, &Go
gui, show,, Tournament Summary Requester

return

Go:

; Get list tourn from text box
ControlGetText, Tourn_List, Edit1, Tournament Summary Requester

; Loop through tourn list
Loop, parse, Tourn_List, `n, `r
{
; Select the Tournament History Requests menu item
WinMenuSelectItem, PokerStars Lobby,, Requests, Tournament History...
; Wait for the Tournament History Requests item to popup
WinWait, Tournament History ahk_class #32770,

; Click the radio button for Tournament ID. Repeat until selected (ControlClick is unreliable, probably a better way of doing this)
loop 
{
Enabled = 0
ControlGet, Enabled, Enabled, , Edit2, Tournament History
IF (Enabled == 0)
	ControlClick, Button2, Tournament History
ELSE
	break
sleep, 1000
}

sleep, 1000
; Enter the tourn ID into the text box
ControlSetText, Edit2, %A_LoopField%, Tournament History
sleep, 1000
Click the OK button
ControlClick, Button4, Tournament History
sleep, 1000
; Wait for the message box
WinWait, PokerStars ahk_class #32770,,PokerStars Lobby History
sleep, 1000
; Click OK on message box
ControlClick, Button1, PokerStars ahk_class #32770,,,,PokerStars Lobby
}
MsgBox, Done!
return
Mark1978 is offline   Reply With Quote
Old 02-19-2009, 01:21 AM   #9
Bigbrent701
centurion
 
Bigbrent701's Avatar
 
Join Date: Jan 2006
Posts: 120
Re: software to automatically request missing tournament summaries (stars)

I would like to get my missing tournament summaries into PT3 but I am struggling to figure out how to use whats in this thread. I dont have any experience using scripts so would appreciate it if someone explained how to use this. I have about 1000 tourneys i need to import summaries for so this would be greatly helpful.
Bigbrent701 is offline   Reply With Quote
Old 02-19-2009, 09:30 AM   #10
Mark1978
adept
 
Join Date: Jul 2005
Location: 45 man turbos
Posts: 855
Re: software to automatically request missing tournament summaries (stars)

Install AutoHotKey.
http://www.autohotkey.com/download/

Copy and paste the script into a text file using notepad and save it as whatever.ahk

For the SQL script, go to Start | All Programs | PostGreSQL 8.3 | PGAdmin III
Expand the tree on the right until you see you PT3 database. You might need a password probably dbpass unless you changed it.
Go to the Tools menu at the top and select Query Tool. Paste in Palsh's SQL script and click the green triangle execute query button. Copy the tourn list. Run the ahk and paste in. Make sure PS is loaded and logged in. Cross fingers. Use at own risk.
Mark1978 is offline   Reply With Quote
Old 02-19-2009, 05:06 PM   #11
Bigbrent701
centurion
 
Bigbrent701's Avatar
 
Join Date: Jan 2006
Posts: 120
Re: software to automatically request missing tournament summaries (stars)

ok and what exactly are the risks associated with this?
Bigbrent701 is offline   Reply With Quote
Old 02-24-2009, 03:54 PM   #12
#1ThunderFan
old hand
 
#1ThunderFan's Avatar
 
Join Date: Feb 2009
Location: In your face!
Posts: 1,837
Re: software to automatically request missing tournament summaries (stars)

Anyone know if this can be edited to request hand history's for specific tourney #?
#1ThunderFan is offline   Reply With Quote
Old 07-20-2009, 10:24 PM   #13
Harold_Callahan
enthusiast
 
Join Date: Jul 2008
Posts: 54
Re: software to automatically request missing tournament summaries (stars)

I have a couple of hundred tourneys to import. SQL script works fine. However the ahk script does not...

using Vista Premium 64bit OS.

Has anyone tested the ahk script on the current stars client?

-Callahan-
Harold_Callahan is offline   Reply With Quote
Old 07-24-2009, 07:35 PM   #14
anyhero
adept
 
Join Date: Mar 2008
Posts: 856
Re: software to automatically request missing tournament summaries (stars)

I have to babysit the ahk script a bit, if the box saying "tournament summary sent to x@y.com" doesn't pop up right away, it won't request the next tournament by itself.

Really great work, this helped me out a ton. Thanks.
anyhero is offline   Reply With Quote
Old 07-27-2009, 08:10 AM   #15
rebelfd
newbie
 
Join Date: Jul 2009
Posts: 34
Re: software to automatically request missing tournament summaries (stars)

I wanted to import some hand histories that I am missing. I tried to update the code, I get the tournament ID, but I'm not getting the script to click the ok button. Can anyone update this for me? If anyone is interested, I emailed support for a listing of tournament ids for a certain period. Then I used the script for tournaments needing results and changed = 0 to > 0 to find all tourneys in my database. I then did a vlookup from my list to pstars list to find the hand histories I was missing. Am now hoping I can get the importer script updated to import a listing of hand history. Thanks for this post, it was really awesome, I imported 600 + tourneys I needed results for.

Craig

[CODE]#SingleInstance, Force
#Persistent
#NoEnv


Gui, Add, Edit, H200 W200
Gui, Add, Button, w56 h20 gGo, &Go
gui, show,, Tournament Summary Requester

return

Go:
ControlGetText, Tourn_List, Edit1, Tournament Summary Requester
Loop, parse, Tourn_List, `n, `r
{
WinMenuSelectItem, PokerStars Lobby,, Requests, Hand History...
WinWait, Hand History ahk_class #32770, , 10
loop
{
Enabled = 0
ControlGet, Enabled, Enabled, , Edit2, Hand History
IF (Enabled == 0)
ControlClick, Button4, Hand History
ELSE
break
sleep, 1000
}
sleep, 1000
ControlSetText, Edit2, %A_LoopField%, Hand History
sleep, 1000
ControlClick, Button2, Hand History
WinWait, PokerStars ahk_class #32770,,PokerStars Lobby
sleep, 1000
ControlClick, Button1, PokerStars ahk_class #32770,,,,PokerStars Lobby
}
MsgBox, Done!
return
rebelfd is offline   Reply With Quote
Old 08-06-2009, 01:43 PM   #16
Maryland_Ace
newbie
 
Join Date: Aug 2009
Posts: 15
Re: software to automatically request missing tournament summaries (stars)

Quote:
Originally Posted by Mark1978 View Post
Install AutoHotKey.
http://www.autohotkey.com/download/

Copy and paste the script into a text file using notepad and save it as whatever.ahk

For the SQL script, go to Start | All Programs | PostGreSQL 8.3 | PGAdmin III
Expand the tree on the right until you see you PT3 database. You might need a password probably dbpass unless you changed it.
Go to the Tools menu at the top and select Query Tool. Paste in Palsh's SQL script and click the green triangle execute query button. Copy the tourn list. Run the ahk and paste in. Make sure PS is loaded and logged in. Cross fingers. Use at own risk.
I am not computer savy at all but I followed your directions step by step and I have a problem. When I get to the part where you paste PAlsh's SQL script, I put it in the box in the pgaadmin III and press the green play triangle execute query button, but when I press that, it gives me this:

ERROR: syntax error at or near "#"
LINE 1: #SingleInstance, Force
^

********** Error **********

ERROR: syntax error at or near "#"
SQL state: 42601
Character: 1

If anybody can please help me out that would be great????
Maryland_Ace is offline   Reply With Quote
Old 08-09-2009, 04:25 PM   #17
Mountain View
stranger
 
Join Date: Aug 2009
Posts: 2
Re: software to automatically request missing tournament summaries (stars)

I am also getting an error as well... can anyone help/
Mountain View is offline   Reply With Quote
Old 08-09-2009, 04:33 PM   #18
Mountain View
stranger
 
Join Date: Aug 2009
Posts: 2
Unhappy Re: software to automatically request missing tournament summaries (stars)

Reads-

Error at Line 1.

Line text; yb#
Error: This line does not contain a recognized actions.

The program will exit.
Mountain View is offline   Reply With Quote
Old 08-20-2009, 07:23 PM   #19
Red_Diamond
adept
 
Join Date: Nov 2005
Posts: 874
Re: software to automatically request missing tournament summaries (stars)

Hmm, well I get the same problem also.
Red_Diamond is offline   Reply With Quote
Old 08-23-2009, 03:09 PM   #20
Mark1978
adept
 
Join Date: Jul 2005
Location: 45 man turbos
Posts: 855
Re: software to automatically request missing tournament summaries (stars)

Quote:
Originally Posted by Maryland_Ace View Post
I am not computer savy at all but I followed your directions step by step and I have a problem. When I get to the part where you paste PAlsh's SQL script, I put it in the box in the pgaadmin III and press the green play triangle execute query button, but when I press that, it gives me this:

ERROR: syntax error at or near "#"
LINE 1: #SingleInstance, Force
^

********** Error **********

ERROR: syntax error at or near "#"
SQL state: 42601
Character: 1

If anybody can please help me out that would be great????
It looks like you are pasting the AHK script into pgadmin also? Just paste the SQL script in there to get the list of tourney #s.
Mark1978 is offline   Reply With Quote
Old 08-23-2009, 03:15 PM   #21
hiho
old hand
 
hiho's Avatar
 
Join Date: Jul 2005
Location: making calls that are HUGELY ev
Posts: 1,891
Re: software to automatically request missing tournament summaries (stars)

why won't they make this as a part of PT3?
hiho is offline   Reply With Quote
Old 08-25-2009, 12:44 PM   #22
mdouglass
journeyman
 
Join Date: Nov 2003
Posts: 223
Re: software to automatically request missing tournament summaries (stars)

.
mdouglass is offline   Reply With Quote
Old 08-27-2009, 03:22 PM   #23
Mark1978
adept
 
Join Date: Jul 2005
Location: 45 man turbos
Posts: 855
Re: software to automatically request missing tournament summaries (stars)

Updated for a change in one of the window titles and an additional pause to make it more reliable.
If you have a ton of requests you might want to reduce all the
sleep, 1000
statements to
sleep, 200
or something.

Code:
#SingleInstance, Force
#Persistent
#NoEnv

; Create the gui
Gui, Add, Edit, H200 W200
Gui, Add, Button, w56 h20 gGo, &Go
gui, show,, Tournament Summary Requester

return

Go:

; Get list tourn from text box
ControlGetText, Tourn_List, Edit1, Tournament Summary Requester

; Loop through tourn list
Loop, parse, Tourn_List, `n, `r
{
; Select the Tournament History Requests menu item
WinMenuSelectItem, PokerStars Lobby,, Requests, Tournament History...
; Wait for the Tournament History Requests item to popup
WinWait, Tournament History ahk_class #32770,

; Click the radio button for Tournament ID. Repeat until selected (ControlClick is unreliable, probably a better way of doing this)
loop 
{
Enabled = 0
ControlGet, Enabled, Enabled, , Edit2, Tournament History
IF (Enabled == 0)
	ControlClick, Button2, Tournament History
ELSE
	break
sleep, 1000
}

sleep, 1000
; Enter the tourn ID into the text box
ControlSetText, Edit2, %A_LoopField%, Tournament History
sleep, 1000
Click the OK button
ControlClick, Button4, Tournament History
sleep, 1000
; Wait for the message box
WinWait, PokerStars ahk_class #32770,,PokerStars
sleep, 1000
; Click OK on message box
ControlClick, Button1, PokerStars ahk_class #32770,,,,PokerStars Lobby
sleep, 1000
}
MsgBox, Done!
return
Mark1978 is offline   Reply With Quote
Old 08-27-2009, 03:39 PM   #24
Mark1978
adept
 
Join Date: Jul 2005
Location: 45 man turbos
Posts: 855
Re: software to automatically request missing tournament summaries (stars)

If you request a tourn summary before the tourn has finished PT3 shows your position as 1st but with $0.00 prize. To get a list of all such tourns:

Code:
SELECT DISTINCT tourney_no
FROM tourney_holdem_results thr JOIN tourney_holdem_summary ths ON thr.id_tourney = ths.id_tourney
WHERE val_finish = 1 AND amt_won = 0
Mark1978 is offline   Reply With Quote
Old 08-27-2009, 04:13 PM   #25
WhiteRider
Pooh-Bah
 
WhiteRider's Avatar
 
Join Date: May 2008
Location: UK
Posts: 5,337
Re: software to automatically request missing tournament summaries (stars)

Quote:
Originally Posted by hiho View Post
why won't they make this as a part of PT3?
I believe there are plans to do this but I don't know when it will be added.
WhiteRider is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

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 02:07 PM.


Powered by vBulletin®
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2008-2020, Two Plus Two Interactive