Open Side Menu Go to the Top

03-08-2006 , 12:08 AM
Quote:
1) ControlClick, Button13 --> how do you know what Button # to use?
Play around with WindowSpy. (It's installed with AHK.)

Quote:
4)Is there any way to step through (ie debug) the ahk code?
You could obviously through various "MsgBox" commands throughout, to know what's going on.

Remember that there are good docs over at www.autohotkey.com .
-Sam
Setting Up A Shortcut To Open Multiple Programs Quote
Setting Up A Shortcut To Open Multiple Programs
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
Setting Up A Shortcut To Open Multiple Programs
03-08-2006 , 12:49 AM
Sam....thanks for the response...
started looking through help with AHK and pointed to window spy...now i see where the button info is coming from...i'm personally thinking that i like the text value better...
eg &Start Import vs Button11 just a little more descriptive

yup...made my way to the autohotkey website...good stuff on there...well when it's up...2x today it's been down/unaccessible...

with repect to msgbox...i tried that earlier...but was a bit of a pain...so i guess the long and short is there isn't a built in debug utility...

but thanks for your reply...this is fun stuff...alot to learn though
Setting Up A Shortcut To Open Multiple Programs Quote
03-08-2006 , 05:27 AM
Quote:
with repect to msgbox...i tried that earlier...but was a bit of a pain...so i guess the long and short is there isn't a built in debug utility...

You can use something like

ListVars
Pause On

Use this in the right places and you should be fine.
Setting Up A Shortcut To Open Multiple Programs Quote
03-08-2006 , 07:54 AM
Quote:
2)WinMinimize --> for Poker Tracker i have it set to minimize to system tray in poker trackers options but this seems to only minimize to task bar. any way to get it to minimize to the system tray?
Replace the minimize part of the PT code with this and it should work:

if (ptMinimize = 1) {
;WinMinimize, %sysPtTxtTitle%
PostMessage, 0x112, 0xF020,,, %sysPtTxtTitle%
}

I have no idea why the min/max don't work for RUN at times.

Adde
Setting Up A Shortcut To Open Multiple Programs Quote
03-08-2006 , 07:56 AM
Nooch, what exactly does your pokerstars bat file do?

Adde
Setting Up A Shortcut To Open Multiple Programs Quote
03-08-2006 , 08:51 AM
Quote:

Replace the minimize part of the PT code with this and it should work:
if (ptMinimize = 1) {
;WinMinimize, %sysPtTxtTitle%
PostMessage, 0x112, 0xF020,,, %sysPtTxtTitle%
}

Adde,
Thanks...i'll give the minimize code a try...but probably won't get a chance till tomorrow...

Quote:

I have no idea why the min/max don't work for RUN at times.

yeah kind of annoying...guess could try the WinMaximize or WinMinimize...but like in previous example may need to be tweaked...


Quote:

Nooch, what exactly does your pokerstars bat file do?

it's for waffle's card and table mods....
here is a copy of what's in the batch file...

The file is called PS.bat

<font class="small">Code:</font><hr /><pre>
copy /y "Gx\bg_old.jpg" "Gx\bg.jpg"
copy /y "Gx\chips&amp;deck\old\card*.bmp" "Gx\chips&amp;deck\"
copy /y "Gx\chips&amp;deck\color\old\card*.bmp" "Gx\chips&amp;deck\color\"
copy /y "Gx\label\old\*.bmp" "Gx\label\"
rem move Gx\bg.jpg Gx\bg.jpg.bak
PokerStarsUpdate.exe
copy /y "Gx\bg.jpg" "Gx\bg_old.jpg"
copy /y "Gx\bg_new.jpg" "Gx\bg.jpg"
copy /y "Gx\chips&amp;deck\card*.bmp" "Gx\chips&amp;deck\old\"
copy /y "Gx\chips&amp;deck\color\card*.bmp" "Gx\chips&amp;deck\color\old\"
copy /y "Gx\label\*.bmp" "Gx\label\old\"
copy /y "Gx\chips&amp;deck\new\card*.bmp" "Gx\chips&amp;deck\"
copy /y "Gx\chips&amp;deck\color\new\card*.bmp" "Gx\chips&amp;deck\color\"
copy /y "Gx\label\new\*.bmp" "Gx\label\"
</pre><hr />

Quote:

You can use something like

ListVars
Pause On

Use this in the right places and you should be fine.

Roland, thanks...i'll try that...i also notice that if it doesn't process all the way through that there is an icon in the system tray...for example you can right click on OPEN and what i saw was this at the end

WinWait, Poker Tracker (Version , Start Timer
ControlClick, Button11 , , Start Timer
WinWait, Poker Tracker (Version, Stop Timer

essentially it was stopped on the last line (assuming b/c it couldn't find Stop Timer b/c the prior line with the ControlClick did not work properly to start the timer)...i've noticed it being sporadic ...sometimes it would go through fine and other times it would stop here...very confusing...

Everyone thanks for your help...when it works all the way through it's very nice...just gotta tweak some of the minor issues...
Setting Up A Shortcut To Open Multiple Programs Quote
03-08-2006 , 09:33 AM
Quote:
Roland, thanks...i'll try that...i also notice that if it doesn't process all the way through that there is an icon in the system tray...for example you can right click on OPEN and what i saw was this at the end

WinWait, Poker Tracker (Version , Start Timer
ControlClick, Button11 , , Start Timer
WinWait, Poker Tracker (Version, Stop Timer

essentially it was stopped on the last line (assuming b/c it couldn't find Stop Timer b/c the prior line with the ControlClick did not work properly to start the timer)...i've noticed it being sporadic ...sometimes it would go through fine and other times it would stop here...very confusing...
It stops there because it's waiting for that window. It will wait forever.
If it's not absolutely crucial that this window is open, you can prevent the script from hanging itsself by using

WinWait, Poker Tracker (Version, Stop Timer, , 3

Now it wait for up to 3 seconds for the window to exist and then continues.
ErrorLevel is set by this command, so if it IS crucial that the window gets opened check ErrorLevel to see if WinWait timed out and if yes, try clicking that button again.
Setting Up A Shortcut To Open Multiple Programs Quote
03-08-2006 , 09:48 AM
Roland,
good idea...i'm very new to ahk so learning as i'm going...
in this situation it's crucial to start the timer...so yes i'll try what you suggested...

would it look like this???

<font class="small">Code:</font><hr /><pre>
WinWait, Poker Tracker (Version , Start Timer
ControlClick, Button11 , , Start Timer
WinWait, Poker Tracker (Version, Stop Timer,,3
if %ErrorLevel% = 0
{
ControlClick, Button11 , , Start Timer
}
ControlClick, Button12 , , Force Import
</pre><hr />

thanks for your help
Setting Up A Shortcut To Open Multiple Programs Quote
03-08-2006 , 09:59 AM
Oooh. You used code tags. Roland can't read code tags. It's like his kryptonite.

I think it's because he's foreign.
-Sam
Setting Up A Shortcut To Open Multiple Programs Quote
03-08-2006 , 10:02 AM
Variables on the left side of an "=" should never have precent signs. Also, ErrorLevel is set to 0 if the window is found and to 1 if the command times out.
Since it is crucial that the window exists you'll want to display an error message of some sorts if the second attempt fails too.

WinWait, Poker Tracker (Version , Start Timer
ControlClick, Button11 , , Start Timer
WinWait, Poker Tracker (Version, Stop Timer,,3
If ErrorLevel &lt;&gt; 0
{
ControlClick, Button11 , , Start Timer
WinWait, Poker Tracker (Version, Stop Timer,,3
If ErrorLevel &lt;&gt; 0
{
Msgbox, Could not start timer.`nThe script will exit.
ExitApp
}
}
ControlClick, Button12 , , Force Import

*untested*
Setting Up A Shortcut To Open Multiple Programs Quote
03-19-2006 , 10:33 AM
I have installed AHK and modified this script to load MTH as well. It is great!

It works - most of the time!

I choose to have the script load party last and it always loads party OK. However, it does not always make the log in.

Obviously this is not critical; I can manage one mouse click but I just wondered why the script is not always actioned by the OS and is there something I could/should do?

Earlier while building the script, I sometimes got a similar problem with the programed click of "Start Timer" in PT not being actioned. If I manually clicked this button the rest of the script ran.

Any ideas?

Cheers

T
Setting Up A Shortcut To Open Multiple Programs Quote
03-20-2006 , 05:28 PM
Probably because Party is slow. . . script tries to click "login" before Party manages to put up the "login" window.

Try throwing in a pause, or better yet, open Party first, open your other apps, then do the login bit at teh end. Should give Party plenty of time.

Other option is to write a loop in code which looks for the login box and waits until it pops up to click it.

Unless there's some other bug that I'm not thinking of. . .
Setting Up A Shortcut To Open Multiple Programs Quote
03-20-2006 , 05:37 PM
Quote:
Probably because Party is slow. . . script tries to click "login" before Party manages to put up the "login" window.

Try throwing in a pause, or better yet, open Party first, open your other apps, then do the login bit at teh end. Should give Party plenty of time.

Other option is to write a loop in code which looks for the login box and waits until it pops up to click it.

Unless there's some other bug that I'm not thinking of. . .
In the old Party, the login screen counted as a window, so you could use the WinWait command. (WAY more elegant than arbitrary pauses or loops.) In the new upgrade, does it no longer work?
-Sam
Setting Up A Shortcut To Open Multiple Programs Quote
03-20-2006 , 10:18 PM
I see you guys using tabs and space to Start Timer and Force Import in PT. I didn't have a problem using

Send, !s ; sends Alt-s
Sleep, 100
Send, !f ; sends Alt-f

after starting the auto import window in PT. I noticed you had a comment in an old script that you couldn't get that to work. Did I just get lucky?
Setting Up A Shortcut To Open Multiple Programs Quote
06-01-2007 , 04:32 AM
For Full Tilt, I made script

PAHUD start
POKERTRACKER auto-import start
Full Tilt Auto Login
moving lobby to center of screen

; --------------------------------------------------------------------------------------------
;; POKERACE HUD ;;
; --------------------------------------------------------------------------------------------
Process, Exist, PAHud.exe
if %ErrorLevel% = 0
{
Run, "C:\Program Files\PokerAce Hud\PAHud.exe", ,min
}

; --------------------------------------------------------------------------------------------
;; POKERTRACKER ;;
; --------------------------------------------------------------------------------------------

doMinimizePokerTracker := 1 ; 1=YES 0=NO

SetTitleMatchMode, 1
Process, Exist, ptrack2.exe
if %ErrorLevel% = 0
{
Run , "C:\Program Files\Poker Tracker V2\ptrack2.exe" , , max
}

openImportWindow := 0
startImportTimer := 0

IfWinNotExist, Poker Tracker (Version, Auto-Import
{
openImportWindow := 1
}
if openImportWindow = 1
{
WinWait, Poker Tracker (Version
WinActivate, Poker Tracker (Version
WinMenuSelectItem, Poker Tracker, , File, Auto-Import Full Tilt
startImportTimer := 1
}
if startImportTimer = 1
{
WinWait, Poker Tracker (Version , Start Timer
ControlClick, Button12 , , Start Timer
WinWait, Poker Tracker (Version, Stop Timer
ControlClick, Button11 , , Force Import
}
if doMinimizePokerTracker
{
WinMinimize, Poker Tracker (Version
}

; --------------------------------------------------------------------------------------------
;; FULL TILT ;;
; --------------------------------------------------------------------------------------------
SetTitleMatchMode, 1
Process, Exist, FullTiltPoker.exe
if %ErrorLevel% = 0
{
Run, "C:\Program Files\Full Tilt Poker\FullTiltPoker.exe", C:\Program Files\Full Tilt Poker

WinWait, Full Tilt Poker
WinActivate, Full Tilt Poker

WinWait, Login
WinActivate, Login

Send {ENTER}

WinGetPos,,, Width, Height, Full Tilt Poker
WinMove, Full Tilt Poker,, (A_ScreenWidth/2)-(Width/2), (A_ScreenHeight/2)-(Height/2)
;WinMove, Full Tilt Poker, , 0, 0 ; use if u want to move lobby to upper left

}
else
{
WinMove, Full Tilt Poker,, (A_ScreenWidth/2)-(Width/2), (A_ScreenHeight/2)-(Height/2)
ControlClick , AfxWnd4262 , Full Tilt Poker
}
; --------------------------------------------------------------------------------------------
Setting Up A Shortcut To Open Multiple Programs Quote
11-10-2007 , 11:09 AM
Can someone post an example of the code for starting AHK inside of a hotkey. I understand how to automatically run an exe program, but I want to start chiploader and betpot AHKs at the same time as opening the shortcut that open multiple programs.

thanks and sorry for such a basic question.
Setting Up A Shortcut To Open Multiple Programs Quote
Setting Up A Shortcut To Open Multiple Programs
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
Setting Up A Shortcut To Open Multiple Programs

      
m