Two Plus Two Newer Archives

Two Plus Two Newer Archives (http://archives1.twoplustwo.com/index.php)
-   Software (http://archives1.twoplustwo.com/forumdisplay.php?f=47)
-   -   Frustrated AHK noob. (http://archives1.twoplustwo.com/showthread.php?t=544493)

dwf76 11-12-2007 05:43 PM

Frustrated AHK noob.
 
Would like some expert advice on the following problem if anybody would care to help.

I am trying to set up a script that opens Poker Tracker, PAHUD and then Stars lobby.

I found the script below which is perfect for the Stars lobby, my problem is I seem to struggle to get more than one item to open at a time. For example in the script below the Lobby will open but PT won't yet if I swap the script round it will open PT but not the lobby, I also have trouble with scripts that set the auto import on PT going.

I would be grateful for any comments.


; --------------------------------------------------------------------------------------------
;; POKERSTARS ;;

SetTitleMatchMode, 1
Process, Exist, PokerStars.exe
if %ErrorLevel% = 0
{
Run, "C:\Program\PokerStars\PokerStarsUpdate.exe"

WinWait, , Network Status
Loop {
IfWinNotExist , , Network Status
break
}
WinWait, PokerStars Lobby
WinMove, PokerStars Lobby, , 0, 0
WinActivate, PokerStars Lobby
WinMenuSelectItem, PokerStars Lobby, , Lobby , Login
WinWait, , User ID
Send {TAB}
Send {TAB}
Send {TAB}
Send {TAB}
Send {SPACE}
}
; --------------------------------------------------------------------------------------------



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

SetTitleMatchMode, 1

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

}

openImport := 0
startImport := 0

IfWinExist, Poker Tracker (Version, Auto-Import PokerStars
{
}
else
{
openImport := 1
}

if openImport = 1
{

WinWait, Poker Tracker (Version
WinActivate, Poker Tracker (Version
WinMenuSelectItem, Poker Tracker, , File, Auto-Import PokerStars
WinWait, Poker Tracker (Version
startImport := 1
}

if startImport = 1
{
WinActivate, Poker Tracker (Version
WinWait, Poker Tracker (Version
Send {TAB}
Send {TAB}
Send {TAB}
Send {TAB}
Send {TAB}
Send {TAB}
Send {SPACE}
Send {TAB}
Send {SPACE}
WinWait, Poker Tracker (Version, Stop Timer
}

WinMinimize, Poker Tracker (Version

; --------------------------------------------------------------------------------------------

Xanderz 11-12-2007 07:42 PM

Re: Frustrated AHK noob.
 
if %ErrorLevel% = 0
should be
if (ErrorLevel == 0)

Your script is probably getting stuck at
WinWait, , Network Status
As I don't think this window comes up unless you are experiencing lag. The script will wait indefinately at the line if the window never appears. Also the lines that follow:

Loop {
IfWinNotExist , , Network Status
break
}

make no sense and the script could be getting stuck in that loop if not stuck at the prior command. Also all If[a-z]+ commands are deprecated (may be totally eliminated in a future release), Use if (!WinExist()) etc.

mattgoody 11-12-2007 08:46 PM

Re: Frustrated AHK noob.
 
http://www.visitthesaint.com/software/the-opener/


All times are GMT -4. The time now is 05:46 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.