Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Internet Gambling > Software
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 03-07-2006, 04:04 PM
Adde Adde is offline
Senior Member
 
Join Date: Oct 2002
Location: Sweden
Posts: 2,453
Default Re: Setting Up A Shortcut To Open Multiple Programs

[ QUOTE ]
[ QUOTE ]
I've just begun to look into Autohotkey. Splendid program! Was planning on constructing a AHK script that would join N tables (with help of waitinglists) and sit out. This way I could click once and get onto 8 tables automatically. I ran out of time though, so this project is up for grabs.

[/ QUOTE ]

If I ever get though my endless list of projects, then maybe I will try to take a look at this too. I have thought about this idea before and it also appeals to me, but not sure how hard it would be to make it robust enough to use without fear of a catastrophe! [img]/images/graemlins/smile.gif[/img]

Juk [img]/images/graemlins/smile.gif[/img]

[/ QUOTE ]

That's what hit me in the head too. The waitlist bug with several dialogs coming up at once could be a nightmare.

Adde
Reply With Quote
  #22  
Old 03-07-2006, 06:19 PM
Adde Adde is offline
Senior Member
 
Join Date: Oct 2002
Location: Sweden
Posts: 2,453
Default Re: Setting Up A Shortcut To Open Multiple Programs

This is fun stuff. I tweaked my script with configuration stuff to choose what programs should start, what site import shuld be started in Pokertracker, what settings should be set in Auto Resizer, and some other stuff. Steal away!

Adde
Reply With Quote
  #23  
Old 03-07-2006, 06:21 PM
Adde Adde is offline
Senior Member
 
Join Date: Oct 2002
Location: Sweden
Posts: 2,453
Default Re: Setting Up A Shortcut To Open Multiple Programs

; --------------------------------------------------------------------------------------------
;
; AutoHotkey script for opening a bunch of poker applications at once.
;
;
; Current Bugs:
;
; - Don't work if PokerTracker dialog for updated version pops up.
; - Don't work if PokerAce Hud dialog for updated version pops up.
; - Don't work if PokerStars news dialog pops up.
;
; --------------------------------------------------------------------------------------------



; --------------- Path Settings
;
; Leave path blank ("") if you don't want to open a specific program.
;

pathPartyPoker := "C:\Program\PartyGaming\PartyPoker\PartyPoker. lnk"
pathPokerStars := "C:\Program\PokerStars\PokerStarsUpdate.exe"
pathPokerTracker := "C:\Program\Poker Tracker V2\ptrack2.exe"
pathAllSnap := "C:\Program\allSnap\allSnap.exe"
pathPokerAce := "C:\Program\PokerAce Hud\PAHud.exe"
pathAutoResizer := "C:\Program\Party_Beta_Auto_Resizer_v07b\Party Beta Auto Resizer.exe"


; --------------- PartyPoker Settings

ppMoveWindowToX := 0 ; [-1=no move]
ppMoveWindowToY := 0

ppLobbyView := "expand" ; [normal/expand/zoom]


; --------------- PokerStars Settings

psMoveWindowToX := 0 ; [-1=no move]
psMoveWindowToY := 0


; --------------- PokerTracker Settings

ptWhatSiteToImport := "partypoker" ; [partypoker/pokerstars]
ptTimerMinutes := 2

ptMinimize := 1 ; [1=YES/0=NO]


; --------------- PokerAce Hud Settings

paMinimize := 1 ; [1=YES/0=NO]


; --------------- Auto Resizer Settings

arMoveWindowToX := 1600 ; [-1=no move]
arMoveWindowToY := 0

arMinimize := 1 ; [1=YES/0=NO]

arPrefsWaitingList := 1 ; [1=YES/0=NO]
arPrefsFirstAvailable := 1
arPrefsWaitForBb := 0
arPrefsPost1stBb := 0
arPrefsBuyIn := 1
arPrefsNoSpam := 1
arPrefsMinimizeHh := 0
arPrefsCheckFoldOn := 0
arPrefsLockSize := 0
arPrefsHideMoney := 0



;
;
;
; DO ONLY CHANGE SETTINGS ABOVE THIS LINE
;
;
; DO NOT CHANGE ANYTHING BELOW THIS LINE
;
;
;



; --------------------------------------------------------------------------------------------
;
; SYSTEM VARIABLES
;
; --------------------------------------------------------------------------------------------

sysArTxtLicense := "Auto-Resizer: Freeware"
sysArTxtTitle := "Auto-Resizer"
sysArTxtTitleKey := "[Auto] Buy-in"

sysPsTxtFirst := "Network Status"
sysPsTxtLobby := "PokerStars Lobby"
sysPsTxtLogin := "Login"
sysPsTxtLoginKey := "User ID"

sysPpTxtLobby := "PartyPoker.com: Poker Lobby"
sysPpTxtLogin := "PartyAccount Login"
sysPpTxtLoginKey := "Account Name"

sysPtTxtTitle := "Poker Tracker (Version"
sysPtTxtImport := "Auto-Import"


sysPpProcessName := "PartyGaming.exe"
sysPsProcessName := "PokerStars.exe"
sysPtProcessName := "ptrack2.exe"
sysPaProcessName := "PAHud.exe"
sysArProcessName := "Party Beta Auto Resizer.exe"
sysAsProcessName := "allSnap.exe"




; --------------------------------------------------------------------------------------------
;
; PARTYPOKER
;
; --------------------------------------------------------------------------------------------

if (pathPartyPoker <> "")
{

SetTitleMatchMode, 1
Process, Exist, %sysPpProcessName%
if (%ErrorLevel% = 0) {
Run, %pathPartyPoker%

WinWait, %sysPpTxtLobby%
WinActivate, %sysPpTxtLobby%
if (ppMoveWindowToX >= 0)
WinMove, %sysPpTxtLobby%, , ppMoveWindowToX , ppMoveWindowToY

if (ppLobbyView = "zoom")
className := "AfxWnd4263"
else if (ppLobbyView = "expand")
className := "AfxWnd4262"
else
className := "AfxWnd4261"

WinWait, %sysPpTxtLobby%
WinActivate, %sysPpTxtLobby%
ControlClick , %className% , %sysPpTxtLobby%

WinWait, %sysPpTxtLogin%
WinActivate, %sysPpTxtLogin%
ControlClick, Button2 , %sysPpTxtLogin% , %sysPpTxtLoginKey%
}

}
; ---------- END




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

if (pathPokerStars <> "")
{

SetTitleMatchMode, 1
Process, Exist, %sysPsProcessName%
if (%ErrorLevel% = 0) {
Run, %pathPokerStars%
WinWait, , %sysPsTxtFirst%
Loop {
IfWinNotExist , , %sysPsTxtFirst%
break
}
WinWait, %sysPsTxtLobby%
if (psMoveWindowToX >= 0)
WinMove, %sysPsTxtLobby%, , psMoveWindowToX , psMoveWindowToY
WinActivate, %sysPsTxtLobby%
WinMenuSelectItem, %sysPsTxtLobby%, , Lobby , Login
SetTitleMatchMode, 2
WinWait, %sysPsTxtLogin% , %sysPsTxtLoginKey%
ControlClick, Button4 , %sysPsTxtLogin% , %sysPsTxtLoginKey%
}

}
; ---------- END




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

if (pathPokerTracker <> "")
{

SetTitleMatchMode, 1
Process, Exist, %sysPtProcessName%
if (%ErrorLevel% = 0) {
Run , %pathPokerTracker% , , max
}

if (ptWhatSiteToImport = "partypoker") {
txtMenu := "Auto-Import Party"
txtWindow := "Auto-Import Party"
btnStart := "Button12"
btnForce := "Button11"
editMins := "PBEDIT701"
}
if (ptWhatSiteToImport = "pokerstars") {
txtMenu := "Auto-Import PokerStars"
txtWindow := "Auto-Import PokerStars"
btnStart := "Button11"
btnForce := "Button12"
editMins := "PBEDIT701"
}

openWindow := 0
startTimer := 0

IfWinNotExist, %sysPtTxtTitle%, %sysPtTxtImport%
{
openWindow := 1
}
if (openWindow = 1) {
WinWait, %sysPtTxtTitle%
WinActivate, %sysPtTxtTitle%
WinMenuSelectItem, %sysPtTxtTitle%, , File, %txtMenu%
startTimer := 1
}
if (startTimer = 1) {
WinWait, %sysPtTxtTitle% , Start Timer
ControlSetText , %editMins% , %ptTimerMinutes% , , Start Timer
ControlClick, %btnStart%, , Start Timer
WinWait, %sysPtTxtTitle%, Stop Timer
ControlClick, %btnForce%, , Force Import
}
if (ptMinimize = 1) {
WinMinimize, %sysPtTxtTitle%
}

}
; ---------- END




; --------------------------------------------------------------------------------------------
;
; POKERACE HUD
;
; --------------------------------------------------------------------------------------------

if (pathPokerAce <> "")
{

Process, Exist, %sysPaProcessName%
if (%ErrorLevel% = 0) {
if (paMinimize)
Run, %pathPokerAce% , , min
else
Run, %pathPokerAce%

}

}
; ---------- END




; --------------------------------------------------------------------------------------------
;
; AUTO RESIZER
;
; --------------------------------------------------------------------------------------------

if (pathAutoResizer <> "")
{

SetTitleMatchMode, 1
Process, Exist, %sysArProcessName%
if (%ErrorLevel% = 0) {
Run, %pathAutoResizer%

WinWait, %sysArTxtLicense%
WinClose, %sysArTxtLicense%

WinWait, %sysArTxtTitle% , %sysArTxtTitleKey%
WinActivate, %sysArTxtTitle% , %sysArTxtTitleKey%

ControlClick, Button1 , %sysArTxtTitle% , %sysArTxtTitleKey%

if (arPrefsWaitingList = 1)
ControlClick, Button13 , %sysArTxtTitle% , %sysArTxtTitleKey%
if (arPrefsFirstAvailable = 1)
ControlClick, Button15 , %sysArTxtTitle% , %sysArTxtTitleKey%
if (arPrefsWaitForBb = 1)
ControlClick, Button4 , %sysArTxtTitle% , %sysArTxtTitleKey%
if (arPrefsPost1stBb = 1)
ControlClick, Button7 , %sysArTxtTitle% , %sysArTxtTitleKey%
if (arPrefsBuyIn = 1)
ControlClick, Button5 , %sysArTxtTitle% , %sysArTxtTitleKey%
if (arPrefsNoSpam = 1)
ControlClick, Button16 , %sysArTxtTitle% , %sysArTxtTitleKey%
if (arPrefsMinimizeHh = 1)
ControlClick, Button18 , %sysArTxtTitle% , %sysArTxtTitleKey%
if (arPrefsCheckFoldOn = 1)
ControlClick, Button17 , %sysArTxtTitle% , %sysArTxtTitleKey%
if (arPrefsLockSize = 1)
ControlClick, Button3 , %sysArTxtTitle% , %sysArTxtTitleKey%
if (arPrefsHideMoney = 1)
ControlClick, Button14 , %sysArTxtTitle% , %sysArTxtTitleKey%

WinWait, %sysArTxtTitle% , %sysArTxtTitleKey%
if (arMoveWindowToX >= 0)
WinMove, %sysArTxtTitle%, , arMoveWindowToX , arMoveWindowToY
if (arMinimize = 1) {
WinWait, %sysArTxtTitle%
WinMinimize, %sysArTxtTitle%
}
}

}
; ---------- END




; --------------------------------------------------------------------------------------------
;
; ALLSNAP
;
; --------------------------------------------------------------------------------------------

if (pathAllSnap <> "")
{

Process, Exist, %sysAsProcessName%
if (%ErrorLevel% = 0) {
Run, %pathAllSnap%
}

}
; ---------- END
Reply With Quote
  #24  
Old 03-07-2006, 10:07 PM
TheNoocH TheNoocH is offline
Senior Member
 
Join Date: Sep 2004
Location: NJ via Philly
Posts: 104
Default Re: Setting Up A Shortcut To Open Multiple Programs

Adde/Sam/anyone who wants to help,

trying this at home...ALMOST got it...couple of quick questions:

1) ControlClick, Button13 --> how do you know what Button # to use? note: this is just an example...i'm more interested how do you find what button in general
eg...i used this in Stars
ControlClick, OK , Login , User ID
ie using OK rather than Button#...just tried it...and seems to work...curious what should be used.

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?

3) i noticed on the RUN lines that the min and/or max don't seem to work all the time? any reasons why?

4)Is there any way to step through (ie debug) the ahk code? sometimes it just seems to stop processing...

5)can you take a look at this code and see if you see anything that could be better...i had to remark out the part in stars about the network status ...i'm assuming b/c i have to wait till the batch file window closes before i start doing the other menu commands, etc?

thanks for all your help....didn't notice the new code...this is based off your previous code examples...

; CODE BEGINS

pathPokerstars := "C:\Program Files\PokerStars\PS.bat"
pathPokerTracker := "C:\Program Files\Poker Tracker V2\ptrack2.exe"

doMinimizePokerTracker := 1 ; 1=YES 0=NO



; --------------------------------------------------------------------------------------------
;; THUNDERBIRD EMAIL ;;

Process, Exist, Thunderbird.exe
if %ErrorLevel% = 0
{
Run, "C:\Program Files\Mozilla Thunderbird\thunderbird.exe", ,min


SetTitleMatchMode, 2

WinWait, Thunderbird
IfWinNotActive, Thunderbird, , WinActivate, Thunderbird,
WinWaitActive, Thunderbird,

WinMinimize, Thunderbird
}
; --------------------------------------------------------------------------------------------


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

SetTitleMatchMode, 1
Process, Exist, ptrack2.exe
if %ErrorLevel% = 0
{
Run , %pathPokerTracker% , , 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 PokerStars
startImportTimer := 1
}
if startImportTimer = 1
{
WinWait, Poker Tracker (Version , Start Timer
ControlClick, Button11 , , Start Timer
WinWait, Poker Tracker (Version, Stop Timer
ControlClick, Button12 , , Force Import
}
if doMinimizePokerTracker
{
WinMinimize, Poker Tracker (Version
}
; --------------------------------------------------------------------------------------------


; --------------------------------------------------------------------------------------------
;; POKERACE HUD ;;

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


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

SetTitleMatchMode, 1
Process, Exist, PokerStars.exe
if %ErrorLevel% = 0
{
Run, %pathPokerstars%

WinWait, C:\WINDOWS\system32\cmd.exe
WinWaitClose ; Wait for the exact window found by WinWait to be closed.


;WinWait, , Network Status

;Loop {
;IfWinNotExist , , Network Status
;break
;}

WinWait, PokerStars Lobby
IfWinNotActive, PokerStars Lobby, , WinActivate, PokerStars Lobby,
WinWaitActive, PokerStars Lobby,

;WinMove, PokerStars Lobby, , 0, 0

WinMenuSelectItem, PokerStars Lobby, , Lobby , Login
SetTitleMatchMode, 2
WinWait, Login , User ID
ControlClick, OK , Login , User ID
WinMenuSelectItem,PokerStars Lobby,,Options ,Images
WinMenuSelectItem,PokerStars Lobby,,Options,Images

ControlClick, x422 y146, PokerStars Lobby
ControlClick, x142 y179, PokerStars Lobby
ControlClick, x317 y205, PokerStars Lobby

}
; --------------------------------------------------------------------------------------------





; CODE ENDS
Reply With Quote
  #25  
Old 03-07-2006, 10:22 PM
IggyWH IggyWH is offline
Senior Member
 
Join Date: Sep 2004
Location: America\'s Finest City
Posts: 8,170
Default Re: Setting Up A Shortcut To Open Multiple Programs

I wrote up a quick bat file that worked for myself but these AHK scripts looks pretty damn cool. Thanks!
Reply With Quote
  #26  
Old 03-08-2006, 12:08 AM
SamIAm SamIAm is offline
Senior Member
 
Join Date: Apr 2004
Location: Merry Chhannukaahh
Posts: 6,273
Default Re: Setting Up A Shortcut To Open Multiple Programs

[ QUOTE ]
1) ControlClick, Button13 --> how do you know what Button # to use?

[/ QUOTE ]Play around with WindowSpy. (It's installed with AHK.)

[ QUOTE ]
4)Is there any way to step through (ie debug) the ahk code?

[/ QUOTE ]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
Reply With Quote
  #27  
Old 03-08-2006, 12:49 AM
TheNoocH TheNoocH is offline
Senior Member
 
Join Date: Sep 2004
Location: NJ via Philly
Posts: 104
Default Re: Setting Up A Shortcut To Open Multiple Programs

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
Reply With Quote
  #28  
Old 03-08-2006, 05:27 AM
Roland Roland is offline
Senior Member
 
Join Date: Mar 2005
Location: Norwich, UK
Posts: 2,703
Default Re: Setting Up A Shortcut To Open Multiple Programs

[ 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...


[/ QUOTE ]

You can use something like

ListVars
Pause On

Use this in the right places and you should be fine.
Reply With Quote
  #29  
Old 03-08-2006, 07:54 AM
Adde Adde is offline
Senior Member
 
Join Date: Oct 2002
Location: Sweden
Posts: 2,453
Default Re: Setting Up A Shortcut To Open Multiple Programs

[ 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?

[/ QUOTE ]

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
Reply With Quote
  #30  
Old 03-08-2006, 07:56 AM
Adde Adde is offline
Senior Member
 
Join Date: Oct 2002
Location: Sweden
Posts: 2,453
Default Re: Setting Up A Shortcut To Open Multiple Programs

Nooch, what exactly does your pokerstars bat file do?

Adde
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:49 PM.


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