|
been playing withthe scripts and come up with a third layout but hardcoded the windows positions to suit me.reltively easy to change them to suit yourself though.
heres the modified script
;================================================= ===============================================
;Move Table - Main Stack position Upper Left - Poker Stars - Rage2100
;================================================= ===============================================
;tab moves table under mouse to next empty slot or back into stack again
;F1 can be used to move tables to the home position at the start of the session
;Escape closes table and updates counter
;================================================= ===============================================
Class_Name=PokerStarsTableFrameClass ;Will only detect and move Poker Stars tables
;================================================= ===============================================
;Read values from MoveTable_Config1_PS.ini file
;================================================= ===============================================
; ini:="MoveTable_Config1_PS.ini"
;iniRead, X_home, %ini%, Location, X_home, 0
;iniRead, Y_home, %ini%, Location, Y_home, 0
;iniRead, Slot1_X, %ini%, Location, Slot1_X, 0
;iniRead, Slot1_Y, %ini%, Location, Slot1_Y, 0
;iniRead, Slot2_X, %ini%, Location, Slot2_X, 0
;iniRead, Slot2_Y, %ini%, Location, Slot2_Y, 0
;iniRead, Slot3_X, %ini%, Location, Slot3_X, 0
;iniRead, Slot3_Y, %ini%, Location, Slot3_Y, 0
X_home=10
Y_home=10
Slot1_X= 1400
Slot1_Y= 0
Slot2_X= 1400
Slot2_Y= 340
Slot3_X= 1400
Slot3_Y= 690
;================================================= ===============================================
S1=0 ;Counts how many tables are in Slot 1
S2=0 ;Counts how many tables are in Slot 2
S3=0 ;Counts how many tables are in Slot 3
T=150 ;Tolerance in pixels used in case a table slightly moves
;================================================= ===============================================
; tab:: can be replaced with MButton:: which will move the tables by pressing the middle mouse button instead of TAB
tab::
CoordMode, Mouse
MouseGetPos,,,tableID
IfWinExist, ahk_id %tableID%
WinGetPos, X, Y,,, %ahk_id%
WinGetClass, class
If class=%Class_Name%
If (X < (X_home + T)) AND (Y < (Y_home + T))
{
If (S1 <= S2) AND (S1 <= S3)
{
WinMove,,, Slot1_X, Slot1_Y,491,363
S1+=1
} else
If (S2 < S1) AND (S2 <= S3)
{
WinMove,,, Slot2_X, Slot2_Y,491,363
S2+=1
} else
If (S3 < S1) AND (S3 < S2)
{
WinMove,,, Slot3_X, Slot3_Y,491,363
S3+=1
}
} else
If (X > (Slot1_X - T)) AND (Y < (Slot1_Y + T))
{
If S1 > 0
{
WinMove,,, X_home, Y_home,1336,946
S1-=1
} else
s1=0
WinMove,,, X_home, Y_home,1336,946
} else
If (X > (Slot3_X - T)) AND (Y > (Slot3_Y - T))
{
If S3 > 0
{
WinMove,,, X_home, Y_home,1336,946
S3-=1
} else
S3=0
WinMove,,, X_home, Y_home,1336,946
} else
If (X > (Slot2_X - T)) AND (Y > (Slot2_Y - T))
{
If S2 > 0
{
WinMove,,, X_home, Y_home,1336,946,,
S2-=1
} else
S2=0
WinMove,,, X_home, Y_home,1336,946,,
}
return
Escape::
CoordMode, Mouse
MouseGetPos,,,tableID
IfWinExist, ahk_id %tableID%
WinGetPos, X, Y,,, %ahk_id%
WinGetClass, class
If class=%Class_Name%
If (X < (X_home + T)) AND (Y < (Y_home + T))
{
} else
If (X > (Slot1_X - T)) AND (Y < (Slot1_Y + T))
{
PostMessage, 0x10, 0, 0,, %ahk_id% ;Close the window
S1-=1
} else
If (X > (Slot2_X - T)) AND (Y > (Slot2_Y - T)) AND (Y < Slot3_Y)
{
PostMessage, 0x10, 0, 0,, %ahk_id% ;Close the window
S2-=1
} else
If (X > (Slot3_X - T)) AND (Y > (Slot3_Y - T))
{
PostMessage, 0x10, 0, 0,, %ahk_id% ;Close the window
S3-=1
}
return
F1::
MouseGetPos,,,tableID
IfWinExist, ahk_id %tableID%
WinGetClass, class
If class=%Class_Name%
WinMove,,, X_home, Y_home,1336,946
return
which produces
|