View Single Post
Robb
Old 08-07-2009, 04:15 AM #7 (permalink)  
4-of-a-Kind

Join Date: Aug 2007
Posts: 3,068
Robb is an unknown quantity at this point
Tired of dicking around waiting forDAMNever for HEM to initialize so you can click "auto import"?

Here's a script that opens Holdem Manager, starts the auto importing, then minimizes HEM to the system tray.

_________

SetTitleMatchMode 2
Run %A_ProgramFiles%\RVG Software\Holdem Manager\HoldemManager.exe
WinWait, www.holdemmanager.net, , 60
SetControlDelay -1
ControlClick, Start Auto Import
WinMinimize, Hold'em Manager
return
_________

This script presumes you've checked the "Launch HUD with AutoImport" HEM feature. Some notes:

1. "SetTitleMatchMode 2" tells the commands in the script to find partial title matches for the various window names.

2. The WinWait command actually stops the script until HEM is up and fully running, but the little "initializing" window is ALSO named "Hold'em Manager blah blah". The active HEM window has the web site URL in its title line, so setting the partial match (mode 2) allows the WinWait command to ignore the little "intializing" window and not try to press the "Start Auto Import" button until the real HEM gets up and running.

3. The "SetControlDelay -1" forces the Control command to initiate instantly, so that if you're moving the mouse around when HEM becomes active, you don't interfere with the mouse clicking action.

4. The last two lines are pretty much self-explanatory.

I tried to get FTP to open and click "login" but it's little initializing window is the same class and has the same name as the login window, so I haven't been successful. I was hoping to write a script that would load HEM, then FTP, then my scripts in order, using WinWait so that they load in series (rather than parallel) which imo is faster. I'll post my workaround if I can't figure out how to make it work right.
My Operation and FTR Rethread: Stations are *sob* so hard to play against
 
Reply With Quote