![]() |
SafeMine (AHK Script)
After nearly driving myself crazy trying to work out why iWitness wouldn't open SNGs in multiple user areas I decided to make a simple version of iWitness (largely based on Roland's original iWitness code he posted in the original V1 post).
Basically this "safe" version should be a good fallback script if (like me) you cannot get iWitness to do a certain task. It doesn't have a fancy GUI and it requires you to navigate to your chosen limit in the Party Lobby by hand (and set your own filters), but other than that it's pretty simply to use. <font color="red">Please note: I haven't really had chance to test this on all game types yet, so I expect there will be some problems - feedback will be helpful.</font> It now has a semaphore lock placed on the list of tables opened in each user area, and also it is capable of self correcting if it accidentally opens the same table in two user areas, so it should be much safer for use in multiple user areas and/or between networked PCs (hence the name 'SafeMine'). If you want to give it a try, then it can be found here. Juk [img]/images/graemlins/smile.gif[/img] |
Re: SafeMine (AHK Script)
Brilliant, Juk!
|
v0.02 available (improved)
I've just improved on the old version slightly and it can be found here.
<u>Changes:</u> 1) Have changed the OpenTables timer to be called at just 30 seconds intervals. 2) Have made the window minimization get done in another thread. 3) Have added a KillSpamWindows thread. <font color="red">Also, make sure you delete any old copies of "tables.txt" and "semaphore" before setting up a new batch of SafeMines. You DO NOT want to delete "tables.txt" and "semaphore" each time you run a copy of SafeMine in a new user area, but you DO want to delete them when you <u>first start running</u> SafeMine (each time). If you forget to delete these before you start, then SafeMine will just sit there doing nothing in any of your user areas. I will try to find a way to fix this in a later version.</font> Juk [img]/images/graemlins/smile.gif[/img] |
Re: v0.02 available (improved)
I am getting the following message when I go to the link for this:
"The requested URL /SafeMine_0_01.ahk was not found on this server. Apache/1.3.33 Server at www.jukofyork.com Port 80" I didn't find a reference to this on the jukofyork web site. |
v0.03 available (improved)
Version 0.03 is much easier to use now, as it doesn't require manual deletion of the table list and semaphore anymore. When the last copy of SafeMine closes, it will automatically delete them for you.
<u>Changes in v0.03:</u> 1) Have fixed KillSpamWindows to use the LastFoundWindow. 2) Have added a lock to each of the copies we are using, and an exit event trap to delete these locks. When the last lock is deleted, we want to also delete the table_list and the semaphore. Thanks to Roland for these ideas! [img]/images/graemlins/smile.gif[/img] To use SafeMine, just follow these simple steps: 1) Open a copy of PartyPoker and navigate to the limit you wish to mine. 2) Set a filter inside of PartyPoker for the types of tables you wish to mine. 3) Run SafeMine.ahk (make sure you have AHK installed) and you should see SafeMine open the required number of tables for you. 4) In as many user areas (or networked PCs) as you wish, repeat steps 1-3. SafeMine will make sure that it only opens a table ONCE throughout all of the user areas, and if it happens to accidentally open the same table multiple times, it will auto-detect/auto-correct this for you. To set the number of tables you wish to mine, then simply edit this line: NumTablesRequired = 4 If SafeMine fails to open or you have a crash, then it is possible that some of the ".lock" files, the "table_list" and the "semaphore" files are left behind by accident. If this happens, then before you start running SafeMine again, simply delete these files by hand (this should only need to be done if SafeMine was exited via TaskManager or you had a crash though...). Juk [img]/images/graemlins/smile.gif[/img] |
Re: v0.02 available (improved)
[ QUOTE ]
I am getting the following message when I go to the link for this: "The requested URL /SafeMine_0_01.ahk was not found on this server. Apache/1.3.33 Server at www.jukofyork.com Port 80" I didn't find a reference to this on the jukofyork web site. [/ QUOTE ] I deleted the old version and posted a new version (Version 0.03) in a new sub-thread. I should really make my OP a generic link to the current version, but I always forget to do this and start off posting v0.01 - next time i'll remember [img]/images/graemlins/smile.gif[/img] Once I have some feedback on this, then I will most likely try to get it posted in the Overcards.com wiki, but just need some people to try it out first. Juk [img]/images/graemlins/smile.gif[/img] |
Re: v0.02 available (improved)
Does this work with Empire? And if it doesn't would it be hard to make it work with Empire?
|
Re: v0.02 available (improved)
[ QUOTE ]
Does this work with Empire? And if it doesn't would it be hard to make it work with Empire? [/ QUOTE ] It should be very easy to get it working with Empire, but I just need some feedback first on how it is working in general. It's not going to get much more complex than this, as all it will be is a fallback script for iWitness. I'll add Empire support, try to detect if you're logged in automatically and fix any bugs, but other than this I'm gonna try to keep it very minimal/simple. Juk [img]/images/graemlins/smile.gif[/img] |
Re: v0.02 available (improved)
[ QUOTE ]
[ QUOTE ] Does this work with Empire? And if it doesn't would it be hard to make it work with Empire? [/ QUOTE ] It should be very easy to get it working with Empire, but I just need some feedback first on how it is working in general. It's not going to get much more complex than this, as all it will be is a fallback script for iWitness. I'll add Empire support, try to detect if you're logged in automatically and fix any bugs, but other than this I'm gonna try to keep it very minimal/simple. Juk [img]/images/graemlins/smile.gif[/img] [/ QUOTE ] I just tested it and it works really great. But I could see it being a problem if the tables it opens breakdown and become empty, SafeMine wouldn't know to close that table would it? I guess that would be remedied by running safemine in conjunction with iwitness. If you could get this working with empire, I would really appreciate it. Thanks alot. |
Re: v0.02 available (improved)
[ QUOTE ]
I just tested it and it works really great. But I could see it being a problem if the tables it opens breakdown and become empty, SafeMine wouldn't know to close that table would it? I guess that would be remedied by running safemine in conjunction with iwitness. [/ QUOTE ] Yes, atm it can't tell if a table is empty (unless it's a SNG), but if Party ever closes table it will fire up a new one (and you could use PT to filer based on >X players at the table). I agree though this might need fixing eventually, but atm I'm just trying to keep it as simple as I possibly can (it's not meant to be a new iWitness, just something to fall back on if you have problems with iWitness like I did for mining SNGs). [ QUOTE ] If you could get this working with empire, I would really appreciate it. [/ QUOTE ] I'll try to do this for the next version (see next post for quick hack to make it work for Empire). Juk [img]/images/graemlins/smile.gif[/img] |
Easy way to make it work with Empire
I just took a look at my code, and because I'm not using any class names, it's very easy to alter this version to make it work with Empire:
Just search for all occurrences of "PartyPoker.com" and replace them with "EmpirePoker.com". Should be good to go then. Juk [img]/images/graemlins/smile.gif[/img] |
Re: Easy way to make it work with Empire
I was gonna try to use this for empire, but then I remembered that there is no filter for the tables (unless I am missing it...). This wouldn't really work becaues I only play six max. Any way to make it only open six max tables by any chance?
|
Re: Easy way to make it work with Empire
You can filter for 6-max through the Party lobby.
|
Re: Easy way to make it work with Empire
[ QUOTE ]
You can filter for 6-max through the Party lobby. [/ QUOTE ] Right, but I want to use empire to mine and not party. |
Re: Easy way to make it work with Empire
[ QUOTE ]
[ QUOTE ] You can filter for 6-max through the Party lobby. [/ QUOTE ] Right, but I want to use empire to mine and not party. [/ QUOTE ] I think I can add this fairly easily by checking the strings in the listbox, but I don't want to start adding too much stuff and end up with it getting real complicated (the idea is to keep it simple). I'm gonna Wiki-ize soon it hopefully, so will look into adding this then. Juk [img]/images/graemlins/smile.gif[/img] |
Re: Easy way to make it work with Empire
[ QUOTE ]
[ QUOTE ] [ QUOTE ] You can filter for 6-max through the Party lobby. [/ QUOTE ] Right, but I want to use empire to mine and not party. [/ QUOTE ] I think I can add this fairly easily by checking the strings in the listbox, but I don't want to start adding too much stuff and end up with it getting real complicated (the idea is to keep it simple). I'm gonna Wiki-ize soon it hopefully, so will look into adding this then. Juk [img]/images/graemlins/smile.gif[/img] [/ QUOTE ] Alright thanks alot, I'd really appreciate that. |
Re: Easy way to make it work with Empire
[ QUOTE ]
I'm gonna Wiki-ize soon it hopefully, so will look into adding this then. Juk [img]/images/graemlins/smile.gif[/img] [/ QUOTE ] Got your email. http://overcards.com/wiki/moin.cgi/SafeMine Enjoy! |
Re: Easy way to make it work with Empire
[ QUOTE ]
[ QUOTE ] I'm gonna Wiki-ize soon it hopefully, so will look into adding this then. Juk [img]/images/graemlins/smile.gif[/img] [/ QUOTE ] Got your email. http://overcards.com/wiki/moin.cgi/SafeMine Enjoy! [/ QUOTE ] Thanks. I just fixed the instructions to match v3 (i'd forgot to update them in the source [img]/images/graemlins/blush.gif[/img]) and added Roland to the credits (as SafeMine is based on his iWitness V1 script). Juk [img]/images/graemlins/smile.gif[/img] |
Re: Easy way to make it work with Empire
By the way, I hate you for naming it SafeMine.
But it rocks. Opens tables much quicker than anything else. I now use it to start sessions just because it opens them quickly. |
Re: Easy way to make it work with Empire
[ QUOTE ]
By the way, I hate you for naming it SafeMine. But it rocks. Opens tables much quicker than anything else. I now use it to start sessions just because it opens them quickly. [/ QUOTE ] Hehe, yep I didn't think very hard about naming it (as always [img]/images/graemlins/smirk.gif[/img]). In hindsight I think perhaps iWitnessLite or something like that would have been better, but now we're stuck with it I think. Juk [img]/images/graemlins/smile.gif[/img] BTW: I'm just about to update to v0.04, but need to test the new Spam-Killing PostMessage calls first (it also is a bit safer if you close a single client and leave the others running - sometimes it would deadlock before...). |
Re: Easy way to make it work with Empire
With the advent of SixthSense, I want to get more serious about my mining. Can someone give me a primer on how to use this with multiple users / multiple party processes to mine 2 or 3 dozen tables at a time?
|
Re: Easy way to make it work with Empire
[ QUOTE ]
With the advent of SixthSense, I want to get more serious about my mining. Can someone give me a primer on how to use this with multiple users / multiple party processes to mine 2 or 3 dozen tables at a time? [/ QUOTE ] [ QUOTE ] To use SafeMine, just follow these simple steps: 1) Open a copy of PartyPoker and navigate to the limit you wish to mine. 2) Set a filter inside of PartyPoker for the types of tables you wish to mine. 3) Run SafeMine.ahk (make sure you have AHK installed) and you should see SafeMine open the required number of tables for you. 4) In as many user areas (or networked PCs) as you wish, repeat steps 1-3. SafeMine will make sure that it only opens a table ONCE throughout all of the user areas, and if it happens to accidentally open the same table multiple times, it will auto-detect/auto-correct this for you. [/ QUOTE ] |
Re: v0.02 available (improved)
[ QUOTE ]
Yes, atm it can't tell if a table is empty (unless it's a SNG), but if Party ever closes table it will fire up a new one (and you could use PT to filer based on >X players at the table). I agree though this might need fixing eventually, but atm I'm just trying to keep it as simple as I possibly can (it's not meant to be a new iWitness, just something to fall back on if you have problems with iWitness like I did for mining SNGs). [/ QUOTE ] Seems like a quick solution to this might be to just close all the tables and reopen every hour, or something along those lines. A check would need to be put in to not close SnG tables prematurely, but seems like a reasonable solution that I wouldn't think would add too much complexity to the script. |
Re: v0.02 available (improved)
I don't think it's a good idea because:
1. Most tables will be active when closed, making you lose some of the history (hands in progress will have a gap.) 2. Dead tables DO get removed by the Party system eventually, and this will selectively remove them. I think continues collection on games in progress is more valuable than one or two extra 'dead table' slots which would get scrapped soon anyway. The burning question for #2 is: how long to finished tourney tables stay open? For limit, I know the big question is how long it has been since someone sat down for a moment. Otherwise, Party shuts down excess open tables until there is exactly one empty table available - but it makes sure there is always one empty table. This forces an "open all tables" strategy to have one empty table open. Anyway, if the Party closes the tables in a reasonble period - 15 minutes, half hour - then a "close all" approach once an hour will save very little time (it will cut the table death time in half, on average) while disrupting live games frequently. |
Re: v0.02 available (improved)
Party SNG tables don't get closed ever automatically. Or at least in any reasonable (< several hours) timeframe.
(This was a month or so ago, I haven't re-tested this recently) |
Re: v0.02 available (improved)
[ QUOTE ]
Party SNG tables don't get closed ever automatically. Or at least in any reasonable (< several hours) timeframe. (This was a month or so ago, I haven't re-tested this recently) [/ QUOTE ] Safemine will close SNGs automatically, but as Mogobu pointed out Party does eventually close the ring game tables on it's own. I can add this to it, but if I'm not careful it will end up very complex. Also the great thing with AHK is it's very easy to edit the code - with a bit of reading up, iWitness features can be added to SafeMine very easily. [img]/images/graemlins/smile.gif[/img] Juk [img]/images/graemlins/smile.gif[/img] |
Re: Easy way to make it work with Empire
[ QUOTE ]
4) In as many user areas [/ QUOTE ] This is the part I don't understand. |
Re: v0.02 available (improved)
I think it's a great script, thanks Juk. It can also be easily modified to create a table opener of sorts.
|
Re: Easy way to make it work with Empire
[ QUOTE ]
[ QUOTE ] 4) In as many user areas [/ QUOTE ] This is the part I don't understand. [/ QUOTE ] Some people use Windows XP's "fast user switching" to log in to their machine more than once with different User name. Each logged in User's programs run at the same time. So you can observe tables from more than one instance of Party at a time, in different User areas. If you want to know how to set it up, look up 'Fast User Switching' in your system's help or over at Microsoft. |
Re: v0.02 available (improved)
[ QUOTE ]
I think it's a great script, thanks Juk. It can also be easily modified to create a table opener of sorts. [/ QUOTE ] Yeah, that's exactly what I did! It's the quickest way to open my first set of tables to consider. But I didn't actually mod the script. I just start my session by running it, and then I kill the script. |
Re: v0.02 available (improved)
That's an option, but it just minimizes the tables otherwise, and also can open full tables [img]/images/graemlins/smile.gif[/img] So I just added a little bit that makes sure it won't open if they are more than 8/10, and so forth.
|
Re: v0.02 available (improved)
[ QUOTE ]
That's an option, but it just minimizes the tables otherwise, and also can open full tables [img]/images/graemlins/smile.gif[/img] So I just added a little bit that makes sure it won't open if they are more than 8/10, and so forth. [/ QUOTE ] Yep in the inside for-loop it is possible to read any of the other elements form the listbox row. I just read the table name, but the number of players seated, if a SNG is "registering", etc can all be read from it by adding code to that loop. Juk [img]/images/graemlins/smile.gif[/img] |
Re: v0.02 available (improved)
Yep. Oh and I did a click/unclick of the 'Finished' button in the filters, as Party does have a lovely habit of leaving SNG's that were "registering" in its list (after filters) even when they are already running; it just helps to clear that down a bit.
|
Re: v0.02 available (improved)
[ QUOTE ]
Yep in the inside for-loop it is possible to read any of the other elements form the listbox row. [/ QUOTE ] Now you're just jerking my chain. AHK doesn't support a "for" loop. . . You have to roll your own. I spent an hour looking for support for "for" loops the other night. Or did you read the other AHK thread and intentionally jerk my chain? [img]/images/graemlins/tongue.gif[/img] |
Re: v0.02 available (improved)
Strictly speaking,
Loop, 10 { } is the same as for(a_index = 1; a_index < 11; a_index++) { } [img]/images/graemlins/tongue.gif[/img] |
Re: v0.02 available (improved)
[ QUOTE ]
Yep. Oh and I did a click/unclick of the 'Finished' button in the filters, as Party does have a lovely habit of leaving SNG's that were "registering" in its list (after filters) even when they are already running; it just helps to clear that down a bit. [/ QUOTE ] Do you do this as part of the script or by hand? I guess an alternative way is to open up the table and then use the code from iWitness which detects empty seats, then close the table (and possibly make a note) if it's full. Juk [img]/images/graemlins/smile.gif[/img] |
Re: v0.02 available (improved)
[ QUOTE ]
[ QUOTE ] Yep in the inside for-loop it is possible to read any of the other elements form the listbox row. [/ QUOTE ] Now you're just jerking my chain. AHK doesn't support a "for" loop. . . You have to roll your own. I spent an hour looking for support for "for" loops the other night. Or did you read the other AHK thread and intentionally jerk my chain? [img]/images/graemlins/tongue.gif[/img] [/ QUOTE ] Nope I didn't see the other post about the AHK for-loop discussion [img]/images/graemlins/tongue.gif[/img] but, I too was surprised that AHK didn't have a for-next loop when I first looked (as the rest of the syntax seems most similar to BASIC). I just called it a for-loop by accident (very similar to the x86 LOOP instruction - "Loop While ECX Not Zero"). Juk [img]/images/graemlins/smile.gif[/img] |
Re: v0.03 available (improved)
i have the problem that it somehow doesn't update the table list with multiple user accounts
the first account creates correct entries in the table list... but after that all new user accounts will not create any entries in the table list... is there anyway to correct this? |
Re: v0.02 available (improved)
how to edit the required number of tables
|
Re: v0.02 available (improved)
anyway to make this work for Full Tilt? That would be so awesome
|
| All times are GMT -4. The time now is 10:20 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.