|
All right, here is a collection of scripts I call "1 Script to Rule Them All" which activates hotkeys for various poker-related activities:
Ctrl Shift F - - Open/login to FlopTurnRiver Forum
Ctrl Shift S - - Take screen shot, open Photo Editor, "paste as new", and open web photo hosting URL
Ctrl Shift H - - Hand history posting: open weaktight.com, FTR (if statement checks if HEM is open and activates/opens as needed)
Ctrl Shift P - - Open/login Full Tilt, open HEM + auto-import, load poker scripts
Ctrl Shift X - - Closes gameplay scripts, but not HEM or poker client
Ctrl Shift G - - Open/login to gmail
I've broken up the script code into bite sized pieces, but the script file I use basically is just all these pieces strung together with blank lines between them.
NOW I'M GONNA LEARN HOW TO AUTOLOAD A SCRIPT ON STARTUP SO THESE HOTKEYS ARE ALWAYS READY RUN.
Cheers.
Play Poker Script loads HEM, FTP and Game Play Scripts
Code:
^+P::
SetTitleMatchMode 2
Run %A_ProgramFiles%\Full Tilt Poker\FullTiltPoker.exe
WinWait, Full Tilt,,15
WinGet, Number, PID, Full Tilt
WinWaitClose, ahk_pid %Number%
WinWaitActive, Full Tilt,,15
SendInput {Click 500,450}
Run %A_ProgramFiles%\RVG Software\Holdem Manager\HoldemManager.exe
WinWait, www.holdemmanager.net,,60
SetControlDelay -1
ControlClick, Start Auto Import
WinMinimize, Hold'em Manager
Run C:\Users\Family\AutoHotKey\MoveTable\MoveTable_Config1_FT_New.ahk
Run C:\Users\Family\AutoHotKey\Betting\BetScript.ahk
return
Notes: The WinWait, WinGet, and WinWaitClose commands track the first Full Tilt Poker window that pops up, the white one with the cards shuffling (it has the same title as the login window). When that's closed, the script can login. (If you don't like storing your passwords online, you can make it click on text boxes and enter strings for usernames and passwords like FTR script shown below.) "ControlClick" doesn't mean the Ctrl + mouse click, it means "click the control button called" Start Auto Import. The MoveTable script is Rage's and Naka's from the thread linked in this thread's OP. The Betting Scripts are the ones I've posted above, plus a couple clunky ones I haven't optimized, yet, but might post when I do.
Exits Game Play Scripts
Code:
^+X::
DetectHiddenWindows On
SetTitleMatchMode 2
WinClose MoveTable_Config1_FT_New.ahk - AutoHotkey
WinClose BetScript.ahk - AutoHotkey
return
Notes: Since the AHK scripts run as minimized system tray windows, the DetectHidden command "On" allows WinClose to "find" them and close them. "SetTitleMatchMode 2" sets the script to match any part of the window title. I've used the exact title names anyway, but I wouldn't have to. The MoveTable script is Rage's and Naka's from the thread linked in this thread's OP.
HH Script
Notes: The If statement checks first if HEM is open (DetectHidden checks the minimized windows, too). If HEM is not, the script loads it. The %A_ProgramFiles% makes the script more portable by checking for your computer's specific "ProgramFiles" folder and making the path name relative.
Screen Shot Script - Pretty thrilled @ this :P
Code:
^+S::
Send {PrintScreen}
Run Microsoft Photo Editor
WinWait Microsoft Photo Editor
WinMaximize Microsoft Photo Editor
Send !{E}
Send {N}
Run http://xs.to/
return
Notes: The "send" commands near end simulate hitting "Alt + E" to activate the Edit Menu, then "N" which is the menu hotkey for "Paste as New Image." I put the WinMaximize command in because my Photo Editor tends to open minimized for some reason - you may not need this. You can also call whatever JPEG editor you like and change the Send commands to work with it.
Open Gmail Script
Code:
^+G::
SetTitleMatchMode 2
Run www.gmail.com
WinWaitActive, Gmail,,30
Sleep 600
Send MyUserName
Send {Tab}
Send MyPassword
Send {Enter}
return
Notes: The ",,30" in WinWaitActive sets a time limit - if gmail isn't open in the browser by then, it exits the script. The sleep 600 pauses for 600 milliseconds (3/5's of a second) for the web page to load which happens AFTER it's become active. You can adjust the sleep time that works best with your machine speed and internet connection.
Open FTR Script - warning! clunky (requires Spy + new coords to work for others)
Code:
^+F::
SetTitleMatchMode 2
Run http://www.flopturnriver.com/phpBB2/forum/
WinWaitActive, Poker Forum,,30
WinMaximize Poker Forum
Sleep 1600
SendInput {Click 600,300,2}
Sleep 5
Send MyUserName
SendInput {Click 770,300,2}
Sleep 5
Send MyPassword
SendInput {Click 1000,300}
return
Notes: This is a HORRIBLE bad script (real programmers will LoL) that's really just here to show you how you can make hotkeys for any set of "repeated movements" you do on your personal computer. The "WinMaximize" makes my browser a specific size so the "Click" command coordinates hit the right spots. The Sleep 5 commands pause the script 1/200th of a second. For some reason, the dialog box needs a split second to recognize the double click before it's ready to accept text for username/password. The "2" at the end of the Click command is for "double click."
I will probably have to edit some of the above, but most of the scripts are stable. The ones noted as clunky mean they simulate mouse clicks relative to my machine and won't function nicely on someone else's without using WindowSpy to get coordinates and editing the script.
|