#1
|
|||
|
|||
The ultimate AutoHotKey script?
I discovered autohotkey independently about a week ago and started whipping up some hotkey scripts for Party. After I'd finished, it occurred to me that someone on 2+2 might have already done such a thing, so I searched the archives, but found that none of the scripts really did what I wanted. I went through about a dozen iterations or so and finally came up with this:
WARNING: USE THIS SCRIPT AT YOUR OWN RISK. IT IS UNTESTED ON OTHER COMPUTERS AND MAY CAUSE UNDESIRABLE RESULTS. IT MAY CEASE TO FUNCTION AFTER A PARTY UPDATE. YOU SHOULD TEST IT ON PLAY MONEY TABLES BEFORE YOU GET THE HANG OF IT. http://www.wam.umd.edu/~cybrown/poker/pokerkeysV3.zip Advantages: -You do not need to position the table windows in any particular locations. -The mouse cursor never moves, as the button-presses are all done through "behind the scenes" window commands. -It will work for any number of windows. There are 2 files, which you should put in the same folder. You'll also need autohotkey (www.autohotkey.com). I can compile the script so that you don't need autohotkey, but I thought people might want to look at the code and modify it to their liking. When you start the script, it should pause a few seconds, and then draw a big red circle around whatever table window is upper-leftmost on your desktop. Hold the left-mouse button while turning the mousewheel up and down, and the circle will move back and forth. Wherever the circle is, that's what table the hotkeys will control: Left-mouse + '1' = first action button (usually fold) Left-mouse + '2' = second action button (usually call) Left-mouse + '3' = third action button (usually raise) (all numbers are in the number row, not the keypad) There are some other all-keyboard shortcuts built into the script...if you understand autohotkey then you can figure them out. Otherwise, if there is interest I will post some additional functionality and customizable features. Also, left-mouse + middle-click will cause the circled table to move to the "back"...thus if you have notes or other windows under the table, you can easily toggle back and forth between the table and the notes. There's more, but I wanted to see if anybody liked this/could think of other wanted features. Let me know what you think. ~Magic_Man |
#2
|
|||
|
|||
Re: The ultimate AutoHotKey script?
I forgot to mention - line 12 of the code says this:
windowsearchterm = Hold'em This is how the program finds the proper windows - it searches for the word "Hold'em" in the titlebar. If you have other programs open that use "Hold'em" in the title, like "Hold'em Stats Tracker" or whatever, the circle will toggle between those windows as well. To avoid this, pick a word that only appears on your table windows, like your player name. If your player name is JoeTheAmazingPokerPlayer, change the line to: windowsearchterm = JoeTheAmazingPokerPlayer ~MagicMan |
#3
|
|||
|
|||
Re: The ultimate AutoHotKey script?
I haven't started using the hotkey stuff yet but its on my list to explore. Thanks for the work and for soing it the way you did, I love customizable open source code.
One thing strikes me, though, just reading your post. You have to hold the left mouse button to use the keys, which sounds like 2-handed operation - no good in my book. Also, I'd rather have all the control on the keyboard and dispense with the mouse - works better for no-looky operation. Presumably all this is possible with different coding? |
#4
|
|||
|
|||
Re: The ultimate AutoHotKey script?
Right now the lines are commented out in the code (in autohotkey the comment character is ';'), but I added code for the following:
NUMPAD0 + UPARROW: scroll tables NUMPAD0 + DOWNARROW: scroll tables (other direction) NUMPAD0 + RIGHTSHIFT: same as middlemouse functionality mentioned in my first post NUMPAD0 + RIGHTCONTROL: 1st action button NUMPAD0 + LEFTARROW: 2nd action button NUMPAD0 + RIGHTARROW: 3rd action button This allows for easy one-handed operation, and I used key combos instead of normal keys in order to avoid misclicks. You can spot those lines easily in the code - just delete the semicolons before them to uncomment them. For lefthanded operation you could use: SPACE + z: 1st button SPACE + x: 2nd button SPACE + c: 3rd button SPACE + LEFTSHIFT: scroll up SPACE + LEFTCONTROL: scroll down (if you're using QWERTY of course). I didn't put those lines in, but they are easily implemented. If you have any questions I can point you in the right direction. I don't code often, so I apologize for the lack of comments in my script. ~MagicMan |
#5
|
|||
|
|||
Re: The ultimate AutoHotKey script?
Very cool, thanks. You just got me jump started on hot keys.
|
#6
|
|||
|
|||
Re: The ultimate AutoHotKey script?
The GetWindowIDs part was the trickiest. I wanted to sort the windows so that they went from 1 to n starting in the top row, left to right, then going to the bottom row, left to right. You should be able to just lift that whole routine from the code without much modification.
~MagicMan |
#7
|
|||
|
|||
Re: The ultimate AutoHotKey script?
Just found this thread and wow - this is awesome. Way better than the previous scripts. I liked the interface of the old script I was using:
all on numpad: 7 - activate upper-left table 9 - activate upper-right table 1 - lower-left 3 - lower-right. 4,5,6 - fold,call,raise and a couple others. I'm going to use what i've learned from your script to make it work for my interface. Thanks a lot. If anyone wants my finished interface when I'm done, pm me. I don't know how long it'll take me though. |
#8
|
|||
|
|||
Re: The ultimate AutoHotKey script?
Alright - here's my finished (I think) script:
https://webspace.utexas.edu/kovnerm/..._AllNumPad.zip I designed it for using 4 tables. Numpads 7,9,1,3 activate upper-left,upper-right, lower-left, lower-right tables respectively. 4,5,6 activate options 1,2,3 (fold,check/call, raise usually - they can also be used to activate "I am Back" and such) Also, if its not your turn but the act in turn boxes are up, 4 checks "fold". numpad + toggles auto-post blinds numpad - toggles deal me out numpad * leaves the table (and then you can click enter when it prompts you if you are sure) I'd like to add that one script is probably not right for more than one person. You should find a script that best fits your needs and modify it. MagicMan's script is a lot more versatile than mine (it doesn't matter where you put the tables or how many there are) but I feel my script is better for my needs. If you need any help with the scripting feel free to ask me and also check out the documentation on autohotkey.com |
#9
|
|||
|
|||
Re: The ultimate AutoHotKey script?
[ QUOTE ]
I discovered autohotkey independently about a week ago and started whipping up some hotkey scripts for Party. After I'd finished, it occurred to me that someone on 2+2 might have already done such a thing, so I searched the archives, but found that none of the scripts really did what I wanted. I went through about a dozen iterations or so and finally came up with this: WARNING: USE THIS SCRIPT AT YOUR OWN RISK. IT IS UNTESTED ON OTHER COMPUTERS AND MAY CAUSE UNDESIRABLE RESULTS. IT MAY CEASE TO FUNCTION AFTER A PARTY UPDATE. YOU SHOULD TEST IT ON PLAY MONEY TABLES BEFORE YOU GET THE HANG OF IT. http://www.wam.umd.edu/~cybrown/poker/pokerkeysV3.zip Advantages: -You do not need to position the table windows in any particular locations. -The mouse cursor never moves, as the button-presses are all done through "behind the scenes" window commands. -It will work for any number of windows. There are 2 files, which you should put in the same folder. You'll also need autohotkey (www.autohotkey.com). I can compile the script so that you don't need autohotkey, but I thought people might want to look at the code and modify it to their liking. When you start the script, it should pause a few seconds, and then draw a big red circle around whatever table window is upper-leftmost on your desktop. Hold the left-mouse button while turning the mousewheel up and down, and the circle will move back and forth. Wherever the circle is, that's what table the hotkeys will control: Left-mouse + '1' = first action button (usually fold) Left-mouse + '2' = second action button (usually call) Left-mouse + '3' = third action button (usually raise) (all numbers are in the number row, not the keypad) There are some other all-keyboard shortcuts built into the script...if you understand autohotkey then you can figure them out. Otherwise, if there is interest I will post some additional functionality and customizable features. Also, left-mouse + middle-click will cause the circled table to move to the "back"...thus if you have notes or other windows under the table, you can easily toggle back and forth between the table and the notes. There's more, but I wanted to see if anybody liked this/could think of other wanted features. Let me know what you think. ~Magic_Man [/ QUOTE ] This is really neat. After messing around with it for a few minutes, I started wishing there was a shortcut for some of the advance action buttons. scrub |
#10
|
|||
|
|||
Re: The ultimate AutoHotKey script?
Thanks magic_man,
I actually started to do something like this with the sdesk but I like this much better. I re-arranged the program and put it on a seperate desktop for poker only. It's all hooked up with my logitech media 600 programmable mouse so that when I scroll it just whips through the windows I have one button set for pre-fold/fold, one for check/fold, one for check/call and one for raise. I hardly have to move the mouse and don't touch the keyboard at all. I'll play for a couple of hours tomorrow to make sure I've got the hang of it but I was four tabling without it, so should be able to work up to between 6-8 I think. I have it set for limit, so might need to make a few quick changes tomorrow for my preferred NL ring games, just need to make sure the buttons are the same. I think the only one thing that would be different is the concepts of calling and raising as per NL standards, probably no change to the set up. I got some info from all who posted your programming here and in some other posts throughout the forum so thank you all for your help [img]/images/graemlins/wink.gif[/img] Now if I can just hire a monkey to push the buttons on my mouse, ohhh that must be me [img]/images/graemlins/grin.gif[/img] One Street at a Time wdbaker Denver, Co |
|
|