Open Side Menu Go to the Top
Register
Absolute UB Hotkeys Absolute UB Hotkeys

03-24-2010 , 03:42 AM
I wanna choke the cat every time I load up UB to fix something LOL
Absolute UB Hotkeys Quote
03-24-2010 , 07:26 PM
Quote:
Originally Posted by akvsaq
Just tried the newest AHK script for the first time on Absolute.

Problems:


2) I'm assuming LobbyKeeper is used to keep the Lobby from auto minimizing? I was very excited to see this because i thought that was extremely annoying, but it doesn't seem to work. (Yes, I did set it to a hotkey in the initial GUI.)
Sorry for the delay, been swampped at work.

I'm afraid I was very "UB Centric" on this. My apologies. I don't have an absolute account, so I never tested it on Absolute.

Here's the lobby keeper code:



Code:
;------------------------------------------ 
;                  Lobby Keeper 
; ------------------------------------------ 
If !LobbyKeeper 
 Return 
WinGet, LobbySize, MinMax, UB - Logged in as ahk_class QDPKGamesSystems ; Get UB Lobby Size 
If (DesiredLobbySize = "Min") 
  If (LobbySize = -1) 
    Return ; Lobby is minimized 
    Else 
      { 
        WinMinimize, UB - Logged in as ahk_class QDPKGamesSystems ; Minimize Lobby 
        Return 
      } 
If (LobbySize != -1) ; Desired LobbySize is Max 
  Return ; Lobby is not minimized (is maximized or is default size), return 
WinRestore, UB - Logged in as ahk_class QDPKGamesSystems ; LobbySize is not max/restored, restore 
Return
The text in the lines containing "UB - Logged in as" need to be changed to something like "Absolute - Logged in as".

Madlion (or some other AHK savy poster), can you do a window spy on the Absolute lobby and verify for the correct text?
Absolute UB Hotkeys Quote
03-24-2010 , 11:54 PM
Thanks for the script. It seems no matter what I set my fold/autofold to, it will not work. The check/call & bet buttons work great. I am simply going off the values I placed in the GUI and the text version of the .ini file. I do not anything about scripting.
Absolute UB Hotkeys Quote
03-25-2010 , 01:46 AM
If you PM me your skype name I can have a quick look at it on teamviewer.
Absolute UB Hotkeys Quote
03-25-2010 , 07:23 AM
Quote:
;------------------------------------------
; Lobby Keeper
; ------------------------------------------
If !LobbyKeeper
Return
WinGet, LobbySize, MinMax, UB - Logged in as ahk_class QDPKGamesSystems ; Get UB Lobby Size
If (DesiredLobbySize = "Min")
If (LobbySize = -1)
Return ; Lobby is minimized
Else
{
WinMinimize, UB - Logged in as ahk_class QDPKGamesSystems ; Minimize Lobby
Return
}
If (LobbySize != -1) ; Desired LobbySize is Max
Return ; Lobby is not minimized (is maximized or is default size), return
WinRestore, UB - Logged in as ahk_class QDPKGamesSystems ; LobbySize is not max/restored, restore
Return
I'm not AHK savvy nor do I know what window spy is but I can tell you that the title of the lobby starts with
"Absolute Poker - Logged in as".
So the exact title of the lobby would be something like
"Absolute Poker - Logged in as [my username] - [whatever status, ex. Diamond Status]"
So do I change all of the "UB - Logged in as" to "Absolute Poker - Logged in as"?
Absolute UB Hotkeys Quote
03-25-2010 , 08:18 AM
You got it
Absolute UB Hotkeys Quote
03-25-2010 , 11:20 AM
Unfortunately the lobby keeper doesn't work for me, neither embedded in my ahk nor standalone. Please tell me the necessary directives to use with that code - I hope that can do the trick.

/e: Should have mentioned, I don't use your main script - only wanted to use the keeper.
Absolute UB Hotkeys Quote
03-25-2010 , 02:20 PM
First of all, thank you very much to both madlion and properous one for the scripts. You guys did a hell of a job.
Changing "UB - Logged in as" to "Absolute Poker - Logged in as" for every instance that happens (total of 3 times) did the trick. I'm happy now.

@baobhan, I'm not AHK savvy but the above did the trick but I DO use the entire script and just changed the above. Also, you need to be logged in for the Lobby Keeper to work.

Improvements/Suggestions/Bugs (for Absolute):

1) It would be SO NICE if there's a way to open or close player notes with the use of a hotkey. THIS IS BY FAR #1 on my wish list for this script. When I take notes on someone, i want to be able to just press a hotkey to open and read/make notes, and press the same hotkey to just close it.
Can somebody add this if at all possible, pretty please w/ sugar on top?

2) How about adding a hotkey for instant replay?

3) When I use a hotkey for 'pre-action fold', it works great. It will toggle between checking/unchecking 'pre-action fold'. (I especially love this feature.)
However, when I use 'pre-action fold' when my only option is "check/fold" instead of "fold", then I can't uncheck it by pressing the fold hotkey again. It gets stuck and I have to go and manually uncheck it by left clicking on it.
[minor problem but just wanted to point it out to you guys.]

4) The 'fold pre-action' is nice, how about adding the option to 'call 1 or call any' (perhaps giving us the option between call 1 or call any in the opening GUI setting?) using the check/call hotkey, and 'raise 1/raise any using the bet/raise hotkey? [maybe not so useful for NL players but comes in handy for mutli-tabling LHE players like me. =)]
Absolute UB Hotkeys Quote
03-26-2010 , 08:01 PM
Great Script

The fold button doesn't work for me on UB

I'm a familiar with AHK, gonna try to solve the problem myself

I tried different table sizes and different Hotkey
Absolute UB Hotkeys Quote
03-27-2010 , 03:23 PM
Any chance for a button to close the active table?

Annoying how SNGs don't auto close when you're out.
Absolute UB Hotkeys Quote
03-27-2010 , 06:19 PM
how can you assign right click to a hotkey?
Absolute UB Hotkeys Quote
03-27-2010 , 08:55 PM
Quote:
Originally Posted by KidSlick
Any chance for a button to close the active table?
This is pretty easy but so is Alt+F4

Quote:
Originally Posted by fluorescenthippo
how can you assign right click to a hotkey?
rbutton
Absolute UB Hotkeys Quote
04-01-2010 , 04:39 PM
I'm sure it is user error. I've gone through the thread 4 times and still can't find out the problem. I have AP set up in options correctly. Can I have other options selected other than the ones needed to run the script (i.e "Show bet Amount".) I have set up the UI to my num keys as well as others. Tried toggling Num Lock on/off. Tried w/ and w/o PT running. Tried multiple window sizes (default, tiled, cascade, customs).

I don't know if this is a factor or a bug: I have to pause the script to see the "setup help," without it flashing faster than I can see it.

This is the first AHK script that I'm attempting to use so I'm sure that is something on my end.

I've noticed several additions to the script throughout the thread. Where are those added into the code? Will anywhere do?

On another note, when running multiple AHK Scripts should there be several AHK Icons in the task bar? <---serious noob.

Thanks for everyones help and hard work on this project.
Absolute UB Hotkeys Quote
04-01-2010 , 07:43 PM
@Zombierunner PM/email me your skype name and we can have a look with teamviewer
Absolute UB Hotkeys Quote
04-01-2010 , 09:29 PM
any way to use this and have the default "bet pot" key be something like "bet 70% pot"?
Absolute UB Hotkeys Quote
04-01-2010 , 10:46 PM
Quote:
Originally Posted by fjjj1
any way to use this and have the default "bet pot" key be something like "bet 70% pot"?
To the best of my knowledge no one has found an easy way to extract the bet size from the table.

I am quite sure it can be done with imagesearch but it is not worth my time as I am not familiar with it and don't have the time to learn it.
If I did I would be compelled to write a complete Betpot script for Cereus.

If you play in top view it is pretty easy to add a few lines to do this with one hoykey.

Click Pot Button
Mouse Wheel Down 1-X times

So if you made it 2 Mouse Wheel Downs a Cbet on a 8bb flop would be 6bb

PM me your skype nick and and I can hook you up with this.
Absolute UB Hotkeys Quote
04-02-2010 , 12:08 AM
Quote:
Originally Posted by madlion
To the best of my knowledge no one has found an easy way to extract the bet size from the table.

I am quite sure it can be done with imagesearch but it is not worth my time as I am not familiar with it and don't have the time to learn it.
If I did I would be compelled to write a complete Betpot script for Cereus.

If you play in top view it is pretty easy to add a few lines to do this with one hoykey.

Click Pot Button
Mouse Wheel Down 1-X times

So if you made it 2 Mouse Wheel Downs a Cbet on a 8bb flop would be 6bb

PM me your skype nick and and I can hook you up with this.
I seem to remember like 3 years ago that I had a betpot script that worked for AP but it seems like dave's BetPot script never supported it..? so I have no idea what it is I'm recalling exactly
Absolute UB Hotkeys Quote
04-02-2010 , 10:19 PM
I added "auto active mouse-over table"
Code:
#InstallKeybdHook
/* 
------------------------------------------ 
               Change Log 
------------------------------------------ 
@00:00 3/10/10: 
• Changed Method to close "Are you sure you want to fold, it's free to check" dialog: was previously a loop that attempted to close and often missed the dialog.  Now's it's part of the ClosePopUps Timer; for better reliability 
• Changed ClosePopUps Timer to 250ms from 500ms. 
• Added Auto Join Wait List Function:  Automatically clicks "Take me to the table and remove my name from the waiting list" (Button3) via ClosePopUps Timer 
• Added Auto Open Wait Listed Tables Function:  Automatically clicks Button #### ("Join Table ######### ") via ClosePopUps Timer; Also added Hot Key to toggle on and off during game play, so tables won't keep automatically opening. 
• Added Auto Close News Popup Function 
• Added Auto Confirm Leave Table Function 
• Removed unnecessary "HokKey, IfWinActive lines" 
• Added LobbyKeeper function 
• Added default values for first time run (no auto options set, Classic View = Default) 
• Added functionality to restore mouse position after closing any popups (InitiateClosePopUps) 
*/ 

#SingleInstance, Force 
#NoEnv 


Version = 2.0 

OnExit exitSub 
StringTrimRight, thisahk, A_ScriptName, 4 
SetWorkingDir %A_ScriptDir% 
SetTitleMatchMode, 2 

Menu, Tray, NoStandard 
Menu, Tray, Add, Settings, menugui 
Menu, Tray, Add, Setup Help, DisplayHelp
Menu, Tray, Add 
Menu, Tray, Add, Reload, reload 
Menu, Tray, Default, Settings 
Menu, Tray, Add 
Menu, Tray, Add, Suspend, Suspend 
Menu, Tray, Add, Pause, TogglePause 
Menu, Tray, Add 
Menu, Tray, Add, Donate, Donation 
Menu, Tray, Add, Exit, ExitSub 

OnMessage(0x112,"WM_SYSCOMMAND") 
WM_SYSCOMMAND(wParam) 
{ 
if (A_Gui && wParam = 0xF020) ; SC_MINIMIZE 
{ 
Gui, Destroy 
return 0 
} 
} 

SetBatchLines,-1 
SetWinDelay,-1 
SendMode Input 

GroupAdd, TABLES, ahk_class DxWndClass 
GroupAdd, LOBBYTABLES, ahk_class DxWndClass 
GroupAdd, LOBBYTABLES, ahk_class QDPKGamesSystems
GroupAdd, PokerTables, ahk_class PokerStarsTableFrameClass ; PokerStars
GroupAdd, PokerTables, - Logged In As ahk_class QWidget,,,Full Tilt Poker - ; Full Tilt Poker
GroupAdd, PokerTables, -  Logged In As ahk_class QWidget,,,Full Tilt Poker -  ; Full Tilt Poker
GroupAdd, PokerTables, ahk_class DxWndClass ; Ultimate Bet


SetTimer, ClosePopUps, 250 
GoSub,GetIni 

if Top = 1 
{ 
foldxa := 440 
foldya := 570 
CheckFoldYa = 540 
potxa := 760 
potya := 505 
halfpotxa := 700 
halfpotya := 505 
} 
if Classic = 1 
{ 
foldxa := 290 
foldya := 490 
CheckFoldYa =  ; Add Correct Value here for Classic View 
potxa := 650 
potya := 480 
} 

Return 

;==========================================; 


ClosePopUps: 
IfWinExist, UB ahk_class #32770,, UB Browser 
  ControlClick, Button1 
IfWinExist, Absolute Poker ahk_class #32770,, AP Browser 
  ControlClick, Button1 
IfWinExist, Tournament Registration ahk_class #32770 
  ControlClick, Button1 
IfWinExist, Alert ahk_class DXPopupWnd 
  ControlClick, Button1 
IfWinExist, Waiting list ahk_class DXPopupWnd 
  ControlClick, Button1 
IfWinExist, Tip for speeding ahk_class DXPopupWnd 
  ControlClick, Button1 
If AutoCloseNewsPopup 
  IfWinExist, News ahk_class #32770, Click to see ; close News window 
    WinClose, News ahk_class #32770, Click to see 
	


IfWinExist, Info ahk_class DXPopupWnd, Are you sure you want to fold ; close checking is free window 
{ 
  ControlClick, Button2, Info ahk_class DXPopupWnd, Checking is free. 
} 

If AutoJoinWaitList 
  IfWinExist, Waiting list ahk_class #32770, Join the waiting list for  ; Click "join" when wait list popup appears 
    { 
      ControlClick, Button7, Waiting list ahk_class #32770, Join the waiting list for 
      ControlClick, OK, Waiting list ahk_class #32770, Join the waiting list for 
    } 

If (AutoOpenWaitListTable and AutoOpenWaitListTableToggle) ; Automatically open wait listed table 
  IfWinExist, Waiting list ahk_class #32770, A seat has opened up at table 
    { 
      Msgbox, Msg Line:%A_LineNumber%`n`n
      ControlClick, Button4, Waiting list ahk_class #32770, A seat has opened up at table ; take seat and remain on other wait lists 
      ControlClick, OK, Waiting list ahk_class #32770, A seat has opened up at table 
    } 

If AutoConfirmExitTable 
  IfWinExist, Warning ahk_class DXPopupWnd, Are you sure you want to leave the table? 
    { 
      ControlClick, OK, Warning ahk_class DXPopupWnd, Are you sure you want to leave the table? 
    } 

If AutoBuyIn ; Auto Buyin Close 
  IfWinExist, Buy chips ahk_class DXPopupWnd 
    { 
      ControlClick, Button3, Buy chips ahk_class DXPopupWnd 
    } 

GoSub, TableActivateUnderMouse

;------------------------------------------ 
;                  Lobby Keeper 
; ------------------------------------------ 
If !LobbyKeeper 
 Return 
WinGet, LobbySize, MinMax, UB - Logged in as ahk_class QDPKGamesSystems ; Get UB Lobby Size 
If (DesiredLobbySize = "Min") 
  If (LobbySize = -1) 
    Return ; Lobby is minimized 
    Else 
      { 
        WinMinimize, UB - Logged in as ahk_class QDPKGamesSystems ; Minimize Lobby 
        Return 
      } 
If (LobbySize != -1) ; Desired LobbySize is Max 
  Return ; Lobby is not minimized (is maximized or is default size), return 
WinRestore, UB - Logged in as ahk_class QDPKGamesSystems ; LobbySize is not max/restored, restore 
Return 




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

BuildGUI: 
Menu, MenuMenu, Add, About, About 
Menu, MenuMenu, Add, Donate, Donation 
Menu, MenuMenu, Add, Help, Help 
Menu, Menubar, Add, Menu, :MenuMenu 
Gui, Menu, MenuBar 
Gui, Color, White 

Gui, Add, Text, x12 y30 w64 h13 , Fold/Autofold 
Gui, Add, Edit, x157 y28 w70 h20 vFold, %Fold% 
Gui, Add, Text, x12 y60 w53 h13 , Check/Call 
Gui, Add, Edit, x157 y58 w70 h20 vCall, %Call% 
Gui, Add, Text, x12 y90 w48 h13 , Bet/Raise 
Gui, Add, Edit, x157 y88 w70 h20 vBet, %Bet% 

Gui, Add, Text, x11 y122 w48 h13 , All In 
Gui, Add, Edit, x156 y117 w70 h20 vAllIn, %AllIn% 

Gui, Add, Text, x12 y150 w16 h13 , Pot 
Gui, Add, Edit, x157 y148 w70 h20 vBetPot, %BetPot% 
Gui, Add, Text, x12 y180 w38 h13 , Half Pot 
Gui, Add, Edit, x157 y178 w70 h20 vBetHalfPot, %BetHalfPot% 
Gui, Add, Text, x12 y210 w57 h13 , Stack Cycle 
Gui, Add, Edit, x157 y208 w70 h20 vStackCycle, %StackCycle% 
Gui, Add, Text, x12 y240 w110 h13 , Register in Tournament 
Gui, Add, Edit, x157 y238 w70 h20 vRegisterTournament, %RegisterTournament% 

Gui, Add, Text, x12 y280 w53 h13 , Table View 
Gui, Add, Radio, x157 y280 w70 h13 Checked%Classic% vClassic, Classic 
Gui, Add, Radio, x157 y300 w70 h13 Checked%Top% vTop, Top


Gui, Add, Checkbox, x15 y317 w110 h20 Checked%AutoBuyIn% vAutoBuyIn, Auto Buy In 

Gui, Add, Checkbox, x15 y347 w110 h20 Checked%AutoJoinWaitList% vAutoJoinWaitList, Auto Join Wait List 

Gui, Add, Checkbox, x15 y377 w150 h20 Checked%AutoCloseNewsPopup% vAutoCloseNewsPopup, Auto Close News Pop Ups 
Gui, Add, Checkbox, x15 y407 w210 h20 Checked%AutoConfirmExitTable% vAutoConfirmExitTable, Auto Confirm Leave Table Confirmation 

Gui, Add, GroupBox, x5 y437 w230 h80 , Automagically Open Wait Listed Tables 
Gui, Add, Checkbox, x14 y455 w110 h20 Checked%AutoOpenWaitListTable% vAutoOpenWaitListTable, Auto Open Table 
Gui, Add, Text, x14 y485 w120 h20 , Toggle Enable/Disable 
Gui, Add, Edit, x154 y483 w70 h20 vAutoOpenWaitListTableToggle, %AutoOpenWaitListTableToggle% 

Gui, Add, GroupBox, x5 y527 w230 h80 , Lobby Keeper 
Gui, Add, Checkbox, x14 y547 w219 h20 Checked%LobbyKeeper% vLobbyKeeper, Enable Keep Lobby Minimized/Maximized ;Enable Keep Lobby Minimized/Maximized 
Gui, Add, Text, x15 y570 w120 h27 , Toggle Minimize/Restore Lobby 
Gui, Add, Edit, x155 y573 w70 h20 vLobbySizeToggle, %LobbySizeToggle% 

Gui, Add, Button, x15 y617 w100 h30 gSave, Submit 
Gui, Add, Button, x125 y617 w100 h30 gCancel, Cancel 

Gui, Show,, % thisahk . " " . Version 
Return 

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

GetIni: 
IfNotExist, %thisahk%.ini 
  GoSub, CreateIni 
IniRead, Fold, %thisahk%.ini, Other, Fold, %A_Space% 
IniRead, Call, %thisahk%.ini, Other, Call, %A_Space% 
IniRead, Bet, %thisahk%.ini, Other, Bet, %A_Space% 
IniRead, AllIn, %thisahk%.ini, Other, AllIn, %A_Space% 
IniRead, BetPot, %thisahk%.ini, Other, BetPot, %A_Space% 
IniRead, BetHalfPot, %thisahk%.ini, Other, BetHalfPot, %A_Space% 
IniRead, StackCycle, %thisahk%.ini, Other, StackCycle, %A_Space% 
IniRead, RegisterTournament, %thisahk%.ini, Other, RegisterTournament, %A_Space% 
IniRead, Classic, %thisahk%.ini, Other, Classic, %A_Space% 
IniRead, Top, %thisahk%.ini, Other, Top, %A_Space% 
IniRead, AutoBuyIn, %thisahk%.ini, Other, AutoBuyIn, %A_Space% 
IniRead, AutoJoinWaitList, %thisahk%.ini, Other, AutoJoinWaitList, %A_Space% 
IniRead, AutoOpenWaitListTable, %thisahk%.ini, Other, AutoOpenWaitListTable, %A_Space% 
IniRead, AutoOpenWaitListTableToggle, %thisahk%.ini, Other, AutoOpenWaitListTableToggle, %A_Space% 
IniRead, AutoCloseNewsPopup, %thisahk%.ini, Other, AutoCloseNewsPopup, %A_Space% 
IniRead, AutoConfirmExitTable, %thisahk%.ini, Other, AutoConfirmExitTable, %A_Space% 
IniRead, AutoOpenWaitListTable, %thisahk%.ini, Other, AutoOpenWaitListTable, %A_Space% 
IniRead, AutoOpenWaitListTableToggle, %thisahk%.ini, Other, AutoOpenWaitListTableToggle, %A_Space% 
IniRead, LobbyKeeper, %thisahk%.ini, Other, LobbyKeeper, %A_Space% 
IniRead, LobbySizeToggle, %thisahk%.ini, Other, LobbySizeToggle, %A_Space% 

Hotkey, IfWinActive      ; make next hotkey assignments  Context insensitive 
If AutoOpenWaitListTable ; If Enabled, create toggle hotkey 
  Hotkey, %AutoOpenWaitListTableToggle%, AutoOpenWaitListTableToggle , 

Hotkey, IfWinExist, UB - Logged in as ahk_class QDPKGamesSystems  ; make next hotkey assignments  Context sensitive (only when lobby exists) 
If LobbyKeeper ; If Enabled, create toggle hotkey 
  Hotkey, %LobbySizeToggle%, LobbySizeToggle , UseErrorLevel On 

Hotkey, IfWinActive, ahk_group TABLES ; Make all following Hotkeys Context Sensitive (only active when TABLES ahk_group is active) 

if Fold 
  Hotkey, %Fold%,Fold, UseErrorLevel On 
if Call 
  Hotkey, %Call%,Call, UseErrorLevel On 
if AllIn 
  Hotkey, %AllIn%,AllIn, UseErrorLevel On 
if Bet 
  Hotkey, %Bet%,Bet, UseErrorLevel On 
if BetPot 
  Hotkey, %BetPot%,Betpot, UseErrorLevel On 
if BetHalfPot 
  Hotkey, %BetHalfPot%,BetHalfPot, UseErrorLevel On 
if StackCycle 
  Hotkey, %StackCycle%,StackCycle, UseErrorLevel On 
  
Hotkey, IfWinActive, ahk_group LOBBYTABLES
  
if RegisterTournament 
  Hotkey, %RegisterTournament%,RegisterTournament, UseErrorLevel On 
return 

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

MakeIni: 
IniWrite, %Fold%, %thisahk%.ini, Other, Fold 
IniWrite, %Call%, %thisahk%.ini, Other, Call 
IniWrite, %Bet%, %thisahk%.ini, Other, Bet 
IniWrite, %AllIn%, %thisahk%.ini, Other, AllIn 
IniWrite, %BetPot%, %thisahk%.ini, Other, BetPot 
IniWrite, %BetHalfPot%, %thisahk%.ini, Other, BetHalfPot 
IniWrite, %StackCycle%, %thisahk%.ini, Other, StackCycle 
IniWrite, %RegisterTournament%, %thisahk%.ini, Other, RegisterTournament 
IniWrite, %Top%, %thisahk%.ini, Other, Top 
IniWrite, %Classic%, %thisahk%.ini, Other, Classic 
IniWrite, %AutoBuyIn%, %thisahk%.ini, Other, AutoBuyIn 
IniWrite, %AutoJoinWaitList%, %thisahk%.ini, Other, AutoJoinWaitList 
IniWrite, %AutoOpenWaitListTable%, %thisahk%.ini, Other, AutoOpenWaitListTable 
IniWrite, %AutoOpenWaitListTableToggle%, %thisahk%.ini, Other, AutoOpenWaitListTableToggle 
IniWrite, %AutoCloseNewsPopup%, %thisahk%.ini, Other, AutoCloseNewsPopup 
IniWrite, %AutoConfirmExitTable%, %thisahk%.ini, Other, AutoConfirmExitTable 
IniWrite, %AutoOpenWaitListTable%, %thisahk%.ini, Other, AutoOpenWaitListTable 
IniWrite, %AutoOpenWaitListTableToggle%, %thisahk%.ini, Other, AutoOpenWaitListTableToggle 
IniWrite, %LobbyKeeper%, %thisahk%.ini, Other, LobbyKeeper 
IniWrite, %LobbySizeToggle%, %thisahk%.ini, Other, LobbySizeToggle 
return 

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

CreateIni: ; Ini doen't exist yet 
; set default values for first time run: 
Classic := True 
Top := False 
AutoBuyIn := False 
AutoJoinWaitList := False 
AutoOpenWaitListTable := False 
AutoCloseNewsPopup := False 
AutoConfirmExitTable := False 
AutoOpenWaitListTable := False 
LobbyKeeper := False 
Gosub, DisplayHelp 
GoSub, MakeIni 
GoSub, BuildGui 
return 

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

GuiClose: 
GoSub, Cancel 
return 

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

MenuGui: 
GoSub, GetIni 
Winget,id,id, %thisahk% ahk_class AutoHotkeyGUI 
if !DllCall( "IsWindowVisible", "UInt",id) 
GoSub, BuildGui 
Gui, Submit,NoHide 
return 

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

Reload: 
Reload 
return 

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

Save: 
Gui, Submit 
FileDelete, %thisahk%.ini 
GoSub, MakeIni 
Reload 
return 

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

Cancel: 
Gui, Destroy 
Return 

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

TogglePause: 
Pause,Toggle 
return 

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

Suspend: 
Suspend 
return 

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

Edit: 
Edit 
return 

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

Donation: 
IfWinExist , UB - Logged in as 
{ 
WinMenuSelectItem, UB - Logged in as,, My Account, Cashier, Account Transfer... 
WinWait, UB Browser ahk_class #32770, , 10 
Sleep, 6000 
MouseClick, left, 290, 310 
Send PunchAKitten 
Send {Tab} 
Send Samuel 
return 
} 
IfWinExist , Absolute Poker - Logged in as 
{ 
WinMenuSelectItem, Absolute Poker - Logged in as,, My Account, Cashier, Account Transfer... 
WinWait, Absolute Poker Browser ahk_class #32770, , 10 
Sleep, 6000 
MouseClick, left, 290, 310 
Send PunchAKitten 
Send {Tab} 
Send Samuel 
return 
} 
Else 
{ 
MsgBox , 0, Donation, If you would like to make a donation my username is PunchAKitten first name Samuel on UB/AP or you can PM me on 2+2 for other options. 
return 
} 

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

Help: 
run http://www.autohotkey.com/docs/KeyList.html 
return 

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

About: 
run http://forumserver.twoplustwo.com/45/software/absolute-ub-hotkeys-656662/ 
return 

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

ExitSub: 
ExitApp   ; release all timers and hot keys (kill persistent) 
return 

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

RegisterTournament: 
WinActivate, ahk_class QDPKGamesSystems 
ControlClick, Button19, ahk_class QDPKGamesSystems 
return 


;------------------------------------------; 
AutoOpenWaitListTableToggle:  ; Toggle Automatically Open Wait Listed Tables Enable 
AutoOpenWaitListTableToggle := !AutoOpenWaitListTableToggle 
Return 

;------------------------------------------; 
LobbySizeToggle:  ; Toggle Lobby Minimize/Restore 
If !LobbyKeeper 
  Return 
IfWinNotActive, UB - Logged in as ahk_class QDPKGamesSystems 
  { 
    DesiredLobbySize = Max 
    WinActivate, UB - Logged in as ahk_class QDPKGamesSystems 
    Return 
  } 
If DesiredLobbySize = Min 
  DesiredLobbySize = Max 
  Else 
    DesiredLobbySize = Min 
Return 
;------------------------------------------; 

Fold: 
MouseGetPos,,,win 
WinActivate, ahk_id %win% 
MouseGetPos, xx, yy 
WinGetPos,,, w, h, A 
foldx:=w*(foldxa/800) 
foldy:=h*(foldya/600) 
MouseClick , left, foldx, foldy, 1, 0  ; click on "Fold" minibutton area 

foldy:=h*(CheckFoldYa/600) 
MouseClick , left, foldx, foldy, 1, 0  ; click on "Check/Fold" minibutton area 

Mousemove, %xx%, %yy%, 0 
return 

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

Call: 
MouseGetPos,,,win 
WinActivate, ahk_id %win% 
Send {F2}{F4} 
return 

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

Bet: 
MouseGetPos,,,win 
WinActivate, ahk_id %win% 
Send {F3}{F5} 
return 

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

StackCycle: 
MouseGetPos,,,win 
WinSet, Bottom,, ahk_id %win% 
return 

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

BetPot: 
MouseGetPos,,,win 
WinActivate, ahk_id %win% 
MouseGetPos, xx, yy 
WinGetPos,,, w, h, A 
potx:=w*(potxa/800) 
poty:=h*(potya/600) 
MouseClick , left, potx, poty, 1, 0 
Mousemove, %xx%, %yy%, 0 
return 

;------------------------------------------; 
AllIn: 
MouseGetPos,,,win 
WinActivate, ahk_id %win% 
MouseGetPos, xx, yy 
WinGetPos,,, w, h, A 
potx:=w*(potxa/800) 
poty:=h*(potya/600) 
MouseClick , left, potx, poty, 1, 0 
SendPlay {WheelUp 100}                 ;moves betslider 100 times to right. 
Mousemove, %xx%, %yy%, 0 
return 

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

BetHalfPot: 
MouseGetPos,,,win 
WinActivate, ahk_id %win% 
MouseGetPos, xx, yy 
WinGetPos,,, w, h, A 
halfpotx:=w*(halfpotxa/800) 
halfpoty:=h*(halfpotya/600) 
MouseClick , left, halfpotx, halfpoty, 1, 0 
Mousemove, %xx%, %yy%, 0 
return 

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

DisplayHelp: 
HelpText = 
( 
Important Configuration Notes 
============================= 

Please ensure the following options are set in the UB/Absolute Poker Software: 

1) Check the "Hot Key" option. 

2) Check the "Disable Pop to Front" option. 

3) It is highly recommended that you check the "Disable Fold and Show" option. 
   (Otherwise all cards you fold will be visible to other players)
)

Msgbox, %HelpText% 

Return 

;------------------------------------------; 
; Auto Click WaitList 
; #IfWinActive, UB - Logged in as ahk_class QDPKGamesSystems 
; RButton:: 
; Click ; Click on current Table 
; ControlGet, WaitListButton, Visible, , Button112, UB - Logged in as ahk_class QDPKGamesSystems ; If Wait List Button is visable, click it 
; If WaitListButton 
;   ControlClick, Button114, UB - Logged in as ahk_class QDPKGamesSystems ; click wait list button 
;   Else 
;     ControlClick, Button113, UB - Logged in as ahk_class QDPKGamesSystems ; click wait UnJoin 
; Return 

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

#IfWinActive 

;==========================================;
; finds the WinId of the window that is on top of the stack at position X,Y (screen position numbers) on the screen...
; if there is a HUD on top of our table (listed on the HudClassList), then that HUD will be ignored, and we continue on to find the top table
WindowOnTopAtXY(X,Y)
{

      global
      local  WindowIdList, WinId, WinX, WinY, WinW, WinH

      ; get a list of all windows on the user's computer
      WinGet, WindowIdList, List
      ; loop thru all of these dialog boxes and see if we need to operate on any of them
      Loop, %WindowIdList%
      {
         ; get the next windows id
         WinId := WindowIdList%A_index%
         WinGetPos,WinX,WinY,WinW,WinH,ahk_id%WinId%

         ; see if our XY is in the range of this window WinId, AND the WinId is a table
         ;if ( (X >= WinX) AND (X <= (WinX + WinW)) AND (Y >= WinY) AND (Y <= (WinY + WinH)) AND WinExist("ahk_group Tables ahk_id" . WinId)  )
         if ( (X >= WinX) AND (X <= (WinX + WinW)) AND (Y >= WinY) AND (Y <= (WinY + WinH)) )
         {
         
            ; check what the class is of this windows
            WinGetClass, Class, ahk_id%WinId%
            

            ; kludge fix for Holdem manager class names that are unique for each user.   we'll just shorten the class to 16 characters
            if instr(Class,"Afx:")
               StringLeft,Class,Class,16
            
            ; check if the class just identified is in our HudClassList, if so then continue on the find the next window
            ; we use instr here, because some of the class names in the list are abbreviated from the full class name (holdem manager creates unique class names for each user)
            if instr(HudClassList,Class)
               continue
         
            return WinId
         }
      }

      return 0
}

TableActivateUnderMouse:
; activate the table under the mouse... if the window under the mouse is not
;     a poker table, then just return (0)
;     returns the winID of the table,
Sleep 100
{
   ;local WinId, MouseX, MouseY

   ; get the screen mouse position
   CoordMode, Mouse, Screen
   MouseGetPos, MouseX, MouseY

   ; find the top window at this mouse location... but ignore any huds
   WinId := WindowOnTopAtXY(MouseX,MouseY)
   WinGetClass, WindowClass, ahk_id%WinId%


   ; if mouse is over a poker table
   IfWinExist, ahk_id%WinId% ahk_group PokerTables
   {
      ; if the table is not active, then activate it
      ifWinNotActive,ahk_id%WinId% ahk_group PokerTables    
	  {
         WinActivate, ahk_id%WinId% ahk_group PokerTables
      }
   }
}
Return
This is going to auto-active Full Tilt Poker, PokerStars and Cereus Network tables

If you want to remove auto-focus on FTP table remove the folowing lines from the code
Code:
GroupAdd, PokerTables, - Logged In As ahk_class QWidget,,,Full Tilt Poker - ; Full Tilt Poker
GroupAdd, PokerTables, -  Logged In As ahk_class QWidget,,,Full Tilt Poker -  ; Full Tilt Poker
For Pokerstars, remove the folowing line
Code:
GroupAdd, PokerTables, ahk_class PokerStarsTableFrameClass ; PokerStars

Madlion, if you want to include the code in your next release (with the option in the gui to check/uncheck the function) I don't mind
Absolute UB Hotkeys Quote
04-03-2010 , 05:50 AM
Yeah I will add a GUI for this sometime thanks. I just run it on it's own personally with a bodog/UB autofocus and sometimes stars.
Absolute UB Hotkeys Quote
04-05-2010 , 09:13 AM
hello!
thx u 4 this script.
i've 1 question. it's possible to add autotimebank option? it's my main problem w UBclient. :-(
Absolute UB Hotkeys Quote
04-05-2010 , 05:57 PM
They have a time bank?
Absolute UB Hotkeys Quote
04-05-2010 , 06:57 PM
yes.
after regular time appears a kind of alarm clock near to the player's place
Absolute UB Hotkeys Quote
04-05-2010 , 08:57 PM
I just time out I don't see a button is this a 100NL and above feature?
Absolute UB Hotkeys Quote
04-06-2010 , 08:08 AM
i'm playing nl10 and have this option.
very strange if u dont have it ;(
Absolute UB Hotkeys Quote
04-06-2010 , 09:43 AM
Ya but it's just a timer you can't click it.......is this a delayed april fool thing? Or am I just a doosh.
Absolute UB Hotkeys Quote

      
m