PDA

View Full Version : AutoHotKey script to play Empire No Limit Games (Mouseless)


Jarekb
06-22-2005, 12:42 AM
I've just found the program last night and this is what I came up with today (took me a few hours). Basically its a mousless solution to NL games which would probably work for limit games also if the buttons are in the same places. So here's what keys do what, code below. Questions, comments, other features I should add would be welcome.

Numpad0 - Fold
NumpadDot - Check/Call
NumpadEnter - Confirm raise
Numpad1-9 - bets big blind, one being a call, 2 being 2x the blind, 3 is 3x and so forth
NumpadAdd - Each time you press the value of the raise goes up by one unit (in my case $.25)
NumpadSub - Each time you press the value of the raise goes down by one unit
1 - Presses the fold checkmark button
2 - Presses check/fold checkmark button
3 - Presses check checkmark button
4 - Presses Call the Big Blind checkmark button
5 - Presses Bet Pot checkmark button

[ QUOTE ]

;Fold
Numpad0::
MouseClick, left, 240, 485 ;Location of the fold button
return

;Check/Call
NumpadDot::
MouseClick, left, 400, 485 ;Location of the check/call button
return

;Bet 1x Big Blind
Numpad1::
MouseClick, left, 400, 485 ;Same as check/call button
return

;Bet 2x Big Blind
Numpad2::
ControlSetText,Edit2,0.50,A
MouseClick, left, 560, 480
return

;Bet 3x Big Blind
Numpad3::
ControlSetText,Edit2,0.75,A
MouseClick, left, 560, 480
return

;Bet 4x Big Blind
Numpad4::
ControlSetText,Edit2,1,A
MouseClick, left, 560, 480
return

;Bet 5x Big Blind
Numpad5::
ControlSetText,Edit2,1.25,A
MouseClick, left, 560, 480
return

;Bet 6x Big Blind
Numpad6::
ControlSetText,Edit2,1.50,A
MouseClick, left, 560, 480
return

;Bet 7x Big Blind
Numpad7::
ControlSetText,Edit2,1.75,A
MouseClick, left, 560, 480
return

;Bet 8x Big Blind
Numpad8::
ControlSetText,Edit2,2,A
MouseClick, left, 560, 480
return

;Bet 9x Big Blind
Numpad9::
ControlSetText,Edit2,2.25,A
MouseClick, left, 560, 480
return


;Raise bet by 1x Big Blind
NumpadAdd::
ControlGetText,CurrentBet,Edit2,A
NewBet := (CurrentBet + 0.25)
ControlSetText,Edit2,%NewBet%,A
return

;Lower bet by 1x Big Blind
NumpadSub::
ControlGetText,CurrentLesserBet,Edit2,A
NewLesserBet := (CurrentLesserBet - 0.25)
ControlSetText,Edit2,%NewLesserBet%,A
return

;Presses raise button after you set amount to confirm bet
NumpadEnter::
MouseClick, left, 560, 480
return

;Press 1 to put check mark on fold button
1::MouseClick,left,178,470
return

;Press 2 to put check mark on check/fold button
2::MouseClick,left,178,500
return

;press 3 to put check mark on check button
3::MouseClick,left,337,474
return

;Press 4 to put check mark on Call Big Blind button
4::MouseClick,left,340,500
return

;press 5 to put check mark on Bet Pot button
5::MouseClick,left,509,472
return


[/ QUOTE ]




To use this just download AutoHotKey (http://www.autohotkey.com/) then save the above text into a text file, name it what you want and end it with a .ahk extension. Just double click it to use the hotkeys I set out. You can easily change the amounts of bets used by each key and also the keys used.

Right now I've got the x,y coordinates set up for Empire poker...so I think it should work for all party skins but haven't tested it yet. I'll post a revised version for CrypticLogic sites in a bit.

Still on my to do list
1. If possible hotkey a few buttons to switch focus from one game to the next.
2. If possible emulate MTH's functionality. Don't know how I would go about that though, gonna leave a post on AHK's forums to see if the scripters over there can help me.

So...should I add anything else?

Benholio
06-22-2005, 01:42 AM
Sending you a PM with a similar AHK script that includes switching focus from one window to another (marks the active window with a big circle, too). I wasn't the original author of this, but I can't remember the guy who originally posted it (my apologies to him).

edit: I'm glad you posted this, as I keep meaning to get around to making a certain script with this. I made one that allowed me to do all actions/switch tables etc, but I never ended up using it. Turns out it was putting more stress on my wrists/hands than regular mousing it was. What I do want to do is make a simple script that places the active window in slot 1, slot 2, slot 3, etc so that I don't have to manually move new tables into an empty spot. Is that lazy or what??

Jarekb
06-22-2005, 09:04 AM
Thanks for sending me the script, will help me lots....when I figure out all the parts and what they do. Trying to figure out what I need to copy out of that to get the qwert asdf switching to work. Also looking at how he handles his action buttons (raise/call/fold...etc), specifically what commands he uses to interface with the game. I'm doing a simple mouse movement to the button, but it's different on each game. Is there a general name for the bid box, call, fold buttons...and so forth.

Can you send me the one that allows you to just switch tables. I've got work in a bit (taking a print out there to gander over. Have you looked at multi table helper, it does that automatically for you, window you are about to act on is top left, other active windows are in a que on the top right, windows that are inactive/folded on the bottom right. It's only for party skins right now though, I was hoping to do something like that (if possible) so that it works on all sites.

Edit: quick questino to you Benholio...does the script you sent me work on all sites?

jba
06-22-2005, 11:34 AM
[ QUOTE ]
I made one that allowed me to do all actions/switch tables etc, but I never ended up using it. Turns out it was putting more stress on my wrists/hands than regular mousing it was.


[/ QUOTE ]

I had the same experience, so I ended up getting this bad boy (http://www.thenerds.net/index.php?page=productpage&pn=9633260403) and mapped the four shoulder buttons to my four tables and the action buttons to check/fold/bet/autopost etc. (I stole some mouseless ahk script from the web somewhere). works like a dream. I should also tell you, I'm a big fan of the ps2 gamepad and am very very comfortable with it, so I might be biased. I will tell you that kicking back on my lazyboy with a gamepad is the nicest poker I've ever played.

[ QUOTE ]

What I do want to do is make a simple script that places the active window in slot 1, slot 2, slot 3, etc so that I don't have to manually move new tables into an empty spot. Is that lazy or what??

[/ QUOTE ]

I have also thought about this. I think you should do it and post the script /images/graemlins/smile.gif

jba
06-22-2005, 11:37 AM
[ QUOTE ]
includes switching focus from one window to another (marks the active window with a big circle, too).

[/ QUOTE ]

can you PM this to me also? (i'm quite interested in the big circle)

grinin
06-22-2005, 12:33 PM
[ QUOTE ]
can you PM this to me also? (i'm quite interested in the big circle)

[/ QUOTE ]

Jarekb
06-22-2005, 05:31 PM
I've figured out how the switching is done in his script and adding it to mine. New script should be up within the hour.

I've thought of hotkeying my ps2 controller also....sounds very lucrative, maybe I'll redo the keys and see how it works later in the week. Right now I'm just happy I got this working.

Jarekb
06-22-2005, 06:08 PM
I would have changed the top post, but seems my edit time has expired. So here is the updated script that changes focus of windows. Also added a few more keys

Numpad0 - Fold
NumpadDot - Check/Call
NumpadEnter - Confirm raise
Numpad1-9 - bets big blind, one being a call, 2 being 2x the blind, 3 is 3x and so forth
NumpadAdd - Each time you press the value of the raise goes up by one unit (in my case $.25)
NumpadSub - Each time you press the value of the raise goes down by one unit
1 - Presses the fold checkmark button
2 - Presses check/fold checkmark button
3 - Presses check checkmark button
4 - Presses Call the Big Blind checkmark button
5 - Presses Bet Pot checkmark button
6 - Presses Auto Post button
7 - Presses Deal Me Out button
Alt+t - Press this to disable all hotkeys, use when you want to type without interruption by hothkeys.

Basically when you run it each key is assigned to one window, the windows are found automatically. The window keys are qwer and asdf. If you want a circle to go around the window you're currently selecting put in circle.bmp (you have to find your own image, doesn't have to be a circle, just make sure to change the name it calls inside the script. Can also be directing to a file outside the direcotyr ex. c:/poker/boom.gif) in the same directory as this file.

This right now only works for Empire and possibly for all Party skins if the button locations are the same...which they should be.

Going to post a modified version within an hour or to with buttons mapped for CrypticLogic sites.

Comments welcome:)


[ QUOTE ]
#singleinstance, force
#winactivateforce

setTitleMatchMode,2
windowsearchterm = Hold'em
;InputBox, windowsearchterm,Window name?,Please enter a word common to all the windows you wish to access:,,,,,,,5,Hold'em
setTimer,GetWindowIDs, 1000
sleep,1000

gui, color, FFFFFF
gui, add, picture, backgroundtrans, circle.bmp
gui,show,
gui, +lastfound +alwaysontop +toolwindow
winset, transcolor,FFFFFF
gui, -caption

WinGetPos, firstX,firstY,,,ahk_id %table1%
newX := firstX - 10
newY := firstY - 17
gui +lastfound
WinMove, %newX%, %newY%

winCounter = 1
increment = 1

; this is to suspend the hotkeys, so you can type normally/browse web/etc
; note: ! = alt, ^ = ctrl.. so !t = alt+t
!t::
Suspend, Toggle


; Q W E R are used to switch to the 8 tables here.. 1 2 3 4
; A S D F 5 6 7 8
; To change which key (or combo of keys) brings up each table, just
; change the hotkey names below.. ex: changing q:: to z:: will make
; the z key do what the q key was doing.
q::
WinCounter = 1
circledWindow := table%winCounter%
WinActivate, ahk_id %circledWindow%
WinGetPos,circledWindowX,circledWindowY,,,ahk_id %circledWindow%
newX := circledWindowX - 10
newY := circledWindowY - 17
gui +lastfound
WinMove, %newX%, %newY%
circledActive = true
return

w::
WinCounter = 2
circledWindow := table%winCounter%
WinActivate, ahk_id %circledWindow%
WinGetPos,circledWindowX,circledWindowY,,,ahk_id %circledWindow%
newX := circledWindowX - 10
newY := circledWindowY - 17
gui +lastfound
WinMove, %newX%, %newY%
circledActive = true
return

e::
WinCounter = 3
circledWindow := table%winCounter%
WinActivate, ahk_id %circledWindow%
WinGetPos,circledWindowX,circledWindowY,,,ahk_id %circledWindow%
newX := circledWindowX - 10
newY := circledWindowY - 17
gui +lastfound
WinMove, %newX%, %newY%
circledActive = true
return


r::
WinCounter = 4
circledWindow := table%winCounter%
WinActivate, ahk_id %circledWindow%
WinGetPos,circledWindowX,circledWindowY,,,ahk_id %circledWindow%
newX := circledWindowX - 10
newY := circledWindowY - 17
gui +lastfound
WinMove, %newX%, %newY%
circledActive = true
return

a::
WinCounter = 5
circledWindow := table%winCounter%
WinActivate, ahk_id %circledWindow%
WinGetPos,circledWindowX,circledWindowY,,,ahk_id %circledWindow%
newX := circledWindowX - 10
newY := circledWindowY - 17
gui +lastfound
WinMove, %newX%, %newY%
circledActive = true
return

s::
WinCounter = 6
circledWindow := table%winCounter%
WinActivate, ahk_id %circledWindow%
WinGetPos,circledWindowX,circledWindowY,,,ahk_id %circledWindow%
newX := circledWindowX - 10
newY := circledWindowY - 17
gui +lastfound
WinMove, %newX%, %newY%
circledActive = true
return


d::
WinCounter = 7
circledWindow := table%winCounter%
WinActivate, ahk_id %circledWindow%
WinGetPos,circledWindowX,circledWindowY,,,ahk_id %circledWindow%
newX := circledWindowX - 10
newY := circledWindowY - 17
gui +lastfound
WinMove, %newX%, %newY%
circledActive = true
return


f::
WinCounter = 8
circledWindow := table%winCounter%
WinActivate, ahk_id %circledWindow%
WinGetPos,circledWindowX,circledWindowY,,,ahk_id %circledWindow%
newX := circledWindowX - 10
newY := circledWindowY - 17
gui +lastfound
WinMove, %newX%, %newY%
circledActive = true
return

;Fold
Numpad0::
MouseClick, left, 240, 485 ;Location of the fold button
return

;Check/Call
NumpadDot::
MouseClick, left, 400, 485 ;Location of the check/call button
return

;Bet 1x Big Blind
Numpad1::
MouseClick, left, 400, 485 ;Same as check/call button
return

;Bet 2x Big Blind
Numpad2::
ControlSetText,Edit2,0.50,A
MouseClick, left, 560, 480
return

;Bet 3x Big Blind
Numpad3::
ControlSetText,Edit2,0.75,A
MouseClick, left, 560, 480
return

;Bet 4x Big Blind
Numpad4::
ControlSetText,Edit2,1,A
MouseClick, left, 560, 480
return

;Bet 5x Big Blind
Numpad5::
ControlSetText,Edit2,1.25,A
MouseClick, left, 560, 480
return

;Bet 6x Big Blind
Numpad6::
ControlSetText,Edit2,1.50,A
MouseClick, left, 560, 480
return

;Bet 7x Big Blind
Numpad7::
ControlSetText,Edit2,1.75,A
MouseClick, left, 560, 480
return

;Bet 8x Big Blind
Numpad8::
ControlSetText,Edit2,2,A
MouseClick, left, 560, 480
return

;Bet 9x Big Blind
Numpad9::
ControlSetText,Edit2,2.25,A
MouseClick, left, 560, 480
return


;Raise bet by 1x Big Blind
NumpadAdd::
ControlGetText,CurrentBet,Edit2,A
NewBet := (CurrentBet + 0.25)
ControlSetText,Edit2,%NewBet%,A
return

;Lower bet by 1x Big Blind
NumpadSub::
ControlGetText,CurrentLesserBet,Edit2,A
NewLesserBet := (CurrentLesserBet - 0.25)
ControlSetText,Edit2,%NewLesserBet%,A
return

;Presses raise button after you set amount to confirm bet
NumpadEnter::
MouseClick, left, 560, 480
return

;Press 1 to put check mark on fold button
1::MouseClick,left,178,470
return

;Press 2 to put check mark on check/fold button
2::MouseClick,left,178,500
return

;press 3 to put check mark on check button
3::MouseClick,left,337,474
return

;Press 4 to put check mark on Call Big Blind button
4::MouseClick,left,340,500
return

;press 5 to put check mark on Bet Pot button
5::MouseClick,left,509,472
return

;press 6 to check off auto post
6::MouseClick,left,15,530
return

;press 7 to check off deal me out
7::MouseClick,left,15,570
return


GetWindowIDs:
setTitleMatchMode,2
WinGet, tableIDs, list, %windowsearchterm%
topcounter = 0
bottomcounter = 0
Loop, %tableIDs%
{
thisID := tableIDs%a_index%

WinGetPos,thisX,thisY,,,ahk_id %thisID%

if thisY < 300
{
topcounter += 1
topWindow%topcounter% = %thisID%
topWindowX%topcounter% = %thisX%
topWindowY%topcounter% = %thisY%
}
else
{
bottomcounter += 1
botWindow%bottomcounter% = %thisID%
botWindowX%bottomcounter% = %thisX%
botWindowY%bottomcounter% = %thisY%
}
}

i = 1
outercounter := topcounter - 1
Loop, %outercounter%
{
j := i + 1
innercounter := topcounter - i
Loop, %innercounter%
{
xBase := topWindowX%i%
if topWindowx%j% < %xbase%
{
temp := topWindowx%i%
topWindowx%i% := topWindowx%j%
topWindowx%j% := temp

temp := topWindowy%i%
topWindowy%i% := topWindowy%j%
topWindowy%j% := temp

temp := topWindow%i%
topWindow%i% := topWindow%j%
topWindow%j% := temp
}

j += 1
}

table%i% := topWindow%i%
i += 1
}
table%topcounter% := topWindow%topcounter%

i = 1
outercounter := bottomcounter - 1
Loop, %outercounter%
{
j := i + 1
innercounter := bottomcounter - i
Loop, %innercounter%
{
xBase := botWindowX%i%
if botWindowx%j% < %xbase%
{
temp := botWindowx%i%
botWindowx%i% := botWindowx%j%
botWindowx%j% := temp

temp := botWindowy%i%
botWindowy%i% := botWindowy%j%
botWindowy%j% := temp

temp := botWindow%i%
botWindow%i% := botWindow%j%
botWindow%j% := temp
}

j += 1
}

tableNum := topcounter + i
table%tablenum% := botWindow%i%
i += 1
}
if bottomcounter > 0
table%tableIDs% := botWindow%bottomcounter%
return

[/ QUOTE ]

Jarekb
06-22-2005, 06:45 PM
Here's the code for CRL sites, same thing just with diffrent locations for mouse clicks. Took out the hot key for 5.

Both the Party and CRL codes should work on all skins, and should work on real money games (so far tested it only out on play money).

[ QUOTE ]
#singleinstance, force
#winactivateforce

setTitleMatchMode,2
windowsearchterm = Hold'em
;InputBox, windowsearchterm,Window name?,Please enter a word common to all the windows you wish to access:,,,,,,,5,Hold'em
setTimer,GetWindowIDs, 1000
sleep,1000

gui, color, FFFFFF
gui, add, picture, backgroundtrans, circle.bmp
gui,show,
gui, +lastfound +alwaysontop +toolwindow
winset, transcolor,FFFFFF
gui, -caption

WinGetPos, firstX,firstY,,,ahk_id %table1%
newX := firstX - 10
newY := firstY - 17
gui +lastfound
WinMove, %newX%, %newY%

winCounter = 1
increment = 1

; this is to suspend the hotkeys, so you can type normally/browse web/etc
; note: ! = alt, ^ = ctrl.. so !t = alt+t
!t::
Suspend, Toggle


; Q W E R are used to switch to the 8 tables here.. 1 2 3 4
; A S D F 5 6 7 8
; To change which key (or combo of keys) brings up each table, just
; change the hotkey names below.. ex: changing q:: to z:: will make
; the z key do what the q key was doing.
q::
WinCounter = 1
circledWindow := table%winCounter%
WinActivate, ahk_id %circledWindow%
WinGetPos,circledWindowX,circledWindowY,,,ahk_id %circledWindow%
newX := circledWindowX - 10
newY := circledWindowY - 17
gui +lastfound
WinMove, %newX%, %newY%
circledActive = true
return

w::
WinCounter = 2
circledWindow := table%winCounter%
WinActivate, ahk_id %circledWindow%
WinGetPos,circledWindowX,circledWindowY,,,ahk_id %circledWindow%
newX := circledWindowX - 10
newY := circledWindowY - 17
gui +lastfound
WinMove, %newX%, %newY%
circledActive = true
return

e::
WinCounter = 3
circledWindow := table%winCounter%
WinActivate, ahk_id %circledWindow%
WinGetPos,circledWindowX,circledWindowY,,,ahk_id %circledWindow%
newX := circledWindowX - 10
newY := circledWindowY - 17
gui +lastfound
WinMove, %newX%, %newY%
circledActive = true
return


r::
WinCounter = 4
circledWindow := table%winCounter%
WinActivate, ahk_id %circledWindow%
WinGetPos,circledWindowX,circledWindowY,,,ahk_id %circledWindow%
newX := circledWindowX - 10
newY := circledWindowY - 17
gui +lastfound
WinMove, %newX%, %newY%
circledActive = true
return

a::
WinCounter = 5
circledWindow := table%winCounter%
WinActivate, ahk_id %circledWindow%
WinGetPos,circledWindowX,circledWindowY,,,ahk_id %circledWindow%
newX := circledWindowX - 10
newY := circledWindowY - 17
gui +lastfound
WinMove, %newX%, %newY%
circledActive = true
return

s::
WinCounter = 6
circledWindow := table%winCounter%
WinActivate, ahk_id %circledWindow%
WinGetPos,circledWindowX,circledWindowY,,,ahk_id %circledWindow%
newX := circledWindowX - 10
newY := circledWindowY - 17
gui +lastfound
WinMove, %newX%, %newY%
circledActive = true
return


d::
WinCounter = 7
circledWindow := table%winCounter%
WinActivate, ahk_id %circledWindow%
WinGetPos,circledWindowX,circledWindowY,,,ahk_id %circledWindow%
newX := circledWindowX - 10
newY := circledWindowY - 17
gui +lastfound
WinMove, %newX%, %newY%
circledActive = true
return


f::
WinCounter = 8
circledWindow := table%winCounter%
WinActivate, ahk_id %circledWindow%
WinGetPos,circledWindowX,circledWindowY,,,ahk_id %circledWindow%
newX := circledWindowX - 10
newY := circledWindowY - 17
gui +lastfound
WinMove, %newX%, %newY%
circledActive = true
return

;Fold
Numpad0::
MouseClick, left, 475, 565 ;Location of the fold button
return

;Check/Call
NumpadDot::
MouseClick, left, 600, 565 ;Location of the check/call button
return

;Bet 1x Big Blind
Numpad1::
MouseClick, left, 600, 565 ;Same as check/call button
return

;Bet 2x Big Blind
Numpad2::
ControlSetText,Edit3,0.50,A
MouseClick, left, 730, 565
return

;Bet 3x Big Blind
Numpad3::
ControlSetText,Edit3,0.75,A
MouseClick, left, 730, 565
return

;Bet 4x Big Blind
Numpad4::
ControlSetText,Edit3,1,A
MouseClick, left, 730, 565
return

;Bet 5x Big Blind
Numpad5::
ControlSetText,Edit3,1.25,A
MouseClick, left, 730, 565
return

;Bet 6x Big Blind
Numpad6::
ControlSetText,Edit3,1.50,A
MouseClick, left, 730, 565
return

;Bet 7x Big Blind
Numpad7::
ControlSetText,Edit3,1.75,A
MouseClick, left, 730, 565
return

;Bet 8x Big Blind
Numpad8::
ControlSetText,Edit3,2,A
MouseClick, left, 730, 565
return

;Bet 9x Big Blind
Numpad9::
ControlSetText,Edit3,2.25,A
MouseClick, left, 730, 565
return


;Raise bet by 1x Big Blind
NumpadAdd::
ControlGetText,CurrentBet,Edit3,A
NewBet := (CurrentBet + 0.25)
ControlSetText,Edit3,%NewBet%,A
return

;Lower bet by 1x Big Blind
NumpadSub::
ControlGetText,CurrentLesserBet,Edit3,A
NewLesserBet := (CurrentLesserBet - 0.25)
ControlSetText,Edit3,%NewLesserBet%,A
return

;Presses raise button after you set amount to confirm bet
NumpadEnter::
MouseClick, left, 730, 565
return

;Press 1 to put check mark on fold button
1::MouseClick,left,440,550
return

;Press 2 to put check mark on check/fold button
2::MouseClick,left,443,590
return

;press 3 to put check mark on check/call button
3::MouseClick,left,555,550
return

;Press 4 to put check mark on Call Any
4::MouseClick,left,555,590
return

;press 6 to check off auto post
6::MouseClick,left,475,620
return

;press 7 to check off Sit Out Next Hand
7::MouseClick,left,610,620
return


GetWindowIDs:
setTitleMatchMode,2
WinGet, tableIDs, list, %windowsearchterm%
topcounter = 0
bottomcounter = 0
Loop, %tableIDs%
{
thisID := tableIDs%a_index%

WinGetPos,thisX,thisY,,,ahk_id %thisID%

if thisY < 300
{
topcounter += 1
topWindow%topcounter% = %thisID%
topWindowX%topcounter% = %thisX%
topWindowY%topcounter% = %thisY%
}
else
{
bottomcounter += 1
botWindow%bottomcounter% = %thisID%
botWindowX%bottomcounter% = %thisX%
botWindowY%bottomcounter% = %thisY%
}
}

i = 1
outercounter := topcounter - 1
Loop, %outercounter%
{
j := i + 1
innercounter := topcounter - i
Loop, %innercounter%
{
xBase := topWindowX%i%
if topWindowx%j% < %xbase%
{
temp := topWindowx%i%
topWindowx%i% := topWindowx%j%
topWindowx%j% := temp

temp := topWindowy%i%
topWindowy%i% := topWindowy%j%
topWindowy%j% := temp

temp := topWindow%i%
topWindow%i% := topWindow%j%
topWindow%j% := temp
}

j += 1
}

table%i% := topWindow%i%
i += 1
}
table%topcounter% := topWindow%topcounter%

i = 1
outercounter := bottomcounter - 1
Loop, %outercounter%
{
j := i + 1
innercounter := bottomcounter - i
Loop, %innercounter%
{
xBase := botWindowX%i%
if botWindowx%j% < %xbase%
{
temp := botWindowx%i%
botWindowx%i% := botWindowx%j%
botWindowx%j% := temp

temp := botWindowy%i%
botWindowy%i% := botWindowy%j%
botWindowy%j% := temp

temp := botWindow%i%
botWindow%i% := botWindow%j%
botWindow%j% := temp
}

j += 1
}

tableNum := topcounter + i
table%tablenum% := botWindow%i%
i += 1
}
if bottomcounter > 0
table%tableIDs% := botWindow%bottomcounter%
return

[/ QUOTE ]

Benholio
06-22-2005, 06:53 PM
Instead of sending mouse clicks, he was just manipulating the controls. Each button/box/etc has a control name associated with it, and various operations that you can do to it.

There is a program included in the AHK install called au3_spy. This program will pull control names, coordinates, values, colors, etc from any window you hover the mouse over. I used this to pull all the control names for the various buttons in a SNG, so that I didn't have to rely on mouse coordinates.

Jarekb
06-22-2005, 07:14 PM
Yeah figured that out last night after a bit of looking at his script and the reference pages. I used mouse clicks because CRL sites for some reason don't have a name for the button...at least nothing shows when i select that window and use the spy.

As you see I've merged the two scripts, took out his key bindings but used the window focus...so far working well for me. Testing it out on 6x 1/2 limit games on CRL to clear a bonus.

wdbaker
06-23-2005, 12:02 AM
I wish we could get it to bring up the active window automatically for X # of seconds or until hand played like MTH, that thing is the bomb, I use a combination of the two right now.

One Street at a Time
wdbaker Denver, Co

Jarekb
06-23-2005, 12:42 AM
Thats what I'm trying to do right now. After 2 hours of playing using these hotkeys I would often hit fold on one window just before another window popsup and I fold the wrong hand. Heres a Link (http://www.autohotkey.com/forum/viewtopic.php?t=4130) to the AHK's forum where I have the latest version of the script. I remapped the buttons for easier play using 1-6 on the numpad for betting action instead of having 1-4 above the qwerty keys to check off the boxes. So now left hand only deals with switching windows and right hand deals with betting commands. Once I figure out how to keep focus on a window until my next command this script will be set.