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 ; -------------------------------------------------------------------------------------------- |
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. |
Re: Frustrated AHK noob.
|
All times are GMT -4. The time now is 02:06 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.