AHK Script for Pokerstars Software / Aurora ?

Ask gaming related questions (AHK v1.1 and older)
pokerplayer81
Posts: 8
Joined: 29 Jan 2020, 01:06

AHK Script for Pokerstars Software / Aurora ?

29 Jan 2020, 02:24

Hi all, i used AHK Script for many years to play Pokerstars on my Windows 7 PC with a Logitech Gamepad
instead of playing it with a mouse and keyboard.

I used AHK script to activate F1 - F12 Buttons with special commands for the Pokerstars Windows,
and addtional Gamepad Software "Xpadder" to connect the Logitech Gamepad Buttons with F1 - F12 Commands.

It worked perfectly, but now Pokerstars released a new Graphics Enginge Software "Aurora",
(More Animation while playing), which looks great, but AHK Script doesnt work anymore.

If i open several Pokerstars Tables as new Windows, it seems that AHK doesnt recognize these
new windows.



This is my old script which worked perfectly for old pokerstars software:
______________________________________________________________________________

Code: Select all

WheelUp::
MouseGetPos,,,tableID
WinGetClass, tableIDclass, ahk_id %tableID%
if tableIDclass = PokerStarsTableFrameClass
{
WinSet, Bottom,, ahk_id %tableID%
}
else
{
Send {WheelUp}
}
return

WheelDown::
MouseGetPos,,,tableID
WinGetClass, tableIDclass, ahk_id %tableID%
if tableIDclass = PokerStarsTableFrameClass
{
WinGet, tableID, IDLast, ahk_class PokerStarsTableFrameClass
WinSet, Top,, ahk_id %tableID%
}
else
{
Send {WheelDown}
}
return

; Fold
F1::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton11
return
}
else IfWinActive, ahk_class PokerStarsTableFrameClass
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.024
YPOS:=height*0.725
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
}

; Check/Call
F2::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton12
return
}
else IfWinActive, ahk_class PokerStarsTableFrameClass
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.78
YPOS:=height*0.97
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
}

; Bet/Raise
F3::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton13
return
}
else IfWinActive, ahk_class PokerStarsTableFrameClass
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.94
YPOS:=height*0.97
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
}

;1.INFO/2.UPDATE/3BACK/
F4::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton13
return
}
else IfWinActive, ahk_class PokerStarsTableFrameClass
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.2575
YPOS:=height*0.82
MouseClick, left, XPOS, YPOS, 1, 0
XPOS:=width*0.2575
YPOS:=height*0.85
MouseClick, left, XPOS, YPOS, 1, 0
XPOS:=width*0.29
YPOS:=height*0.85
MouseClick, left, XPOS, YPOS, 1, 0
XPOS:=width*0.83
YPOS:=height*0.885
MouseClick, left, XPOS, YPOS, 1, 0
XPOS:=width*0.2575
YPOS:=height*0.85
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
} 

; Decrease Bet Size
F5::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton13
return
}
else IfWinActive, ahk_class PokerStarsTableFrameClass
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.728
YPOS:=height*0.850
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
} 

; Increase Bet Size
F6::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton13
return
}
else IfWinActive, ahk_class PokerStarsTableFrameClass
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.975
YPOS:=height*0.850
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
}

; SIT OUT AFTER NEXT BIG BLIND
F7::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton13
return
}
else IfWinActive, ahk_class PokerStarsTableFrameClass
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.024
YPOS:=height*0.775
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
} 

; SIT OUT AFTER NEXT HAND
F8::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton13
return
}
else IfWinActive, ahk_class PokerStarsTableFrameClass
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.024
YPOS:=height*0.75
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
} 

; Bet/Raise
F9::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton13
return
}
else IfWinActive, ahk_class PokerStarsTableFrameClass
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.928
YPOS:=height*0.817
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
} 

SetTitleMatchMode, 2
 
~pgup::
WinMaximize, PokerStars Lobby
return
 
~pgdn::
WinMinimize, PokerStars Lobby
return
[Mod edit: [code][/code] tags added]
_____________________________________________________________________________

Do you have any suggestions how i can change the script so it works on the new
Pokerstars Graphics "Aurora" ???

If you need more information to help me, please let me know, thank you so much...!
User avatar
boiler
Posts: 16767
Joined: 21 Dec 2014, 02:44

Re: AHK Script for Pokerstars Software / Aurora ?

29 Jan 2020, 06:42

Are you able to turn off Aurora in your PS settings? Or do you prefer using it? If you do want to turn it off but your client isn’t letting you, you may be able to do so by manually changing the user.ini file.
pokerplayer81
Posts: 8
Joined: 29 Jan 2020, 01:06

Re: AHK Script for Pokerstars Software / Aurora ?

29 Jan 2020, 07:05

Thx, i can turn Aurora off, but i want to use Aurora 100%... Because the Aurora Graphics are much better.. Also if you have HD Resolution (1920x1080) on your screen, full screen play is not possible with the old graphics engine... Do you have any idea how to change the AHK script for Aurora ? thx...
User avatar
boiler
Posts: 16767
Joined: 21 Dec 2014, 02:44

Re: AHK Script for Pokerstars Software / Aurora ?

29 Jan 2020, 10:39

I'm not able to get a full screen on mine (2560 x 1440), and when I try to maximize the window by clicking the maximize button on the title bar, it makes it much larger but not full screen (not even 1920 x 1080). Do you just maximize the window and it goes full screen?

Is it possible that with Aurora, you are using a different theme such that the buttons are located in a different location than what the script is expecting?
pokerplayer81 wrote: If i open several Pokerstars Tables as new Windows, it seems that AHK doesnt recognize these
new windows.
Are you playing all of these windows stacked full screen or are they tiled? Does it work on the first table until you open more tables? Does it keep working on the first window and not the other windows? What if you actually click on another window to make sure it becomes the active window? People using hotkeys on Stars (i.e., they're not physically clicking on each window) can actually play on all the tables without changing which table is the active window in the Windows sense even though it is the target window in the Stars sense (it is under the mouse, if that's how the user has it designated in their setup).
pokerplayer81
Posts: 8
Joined: 29 Jan 2020, 01:06

Re: AHK Script for Pokerstars Software / Aurora ?

30 Jan 2020, 05:36

If Aurora is activated, i can simply maximize to 1920 x 1080 FULL SCREEN TABLE.
Maybe the Theme with button location is a abit different, but AHK doesnt work at all here, so the location of the buttons within the new Aurora Window is not the problem,
This could have been easily adjusted.

AHK doesnt work on Aurora, neither on full screen nor on reduced Windows Mode.
It doesnt work on any table, no matter if i open 1 or more tables.
Like i said, active Pokerstars Aurora Windows is not recocgnized by AHK Skript.

I am not a programmer, so i need help to solve this problem...
Would be rewarded by paypal by the way ;)
hugoreis
Posts: 6
Joined: 29 Jan 2020, 07:10

Re: AHK Script for Pokerstars Software / Aurora ?

30 Jan 2020, 07:00

Sorry for my intromission on this post, but i have a similar problem, i use a script for table view, without buttons, just table layout. But with Aurora enable or disable, doesnt work.
pokerplayer81 with Aurora disable it works your script???
im following this post, maybe someone can help both of us
User avatar
boiler
Posts: 16767
Joined: 21 Dec 2014, 02:44

Re: AHK Script for Pokerstars Software / Aurora ?

30 Jan 2020, 07:20

So I guess you’re saying that you have other information other than the script you posted that tells you that AHK doesn’t recognize these tables at all. How is it that you know that? Your script only clicks buttons, but you seem to already know that changing the location of the clicks to match the theme you’re using doesn’t/wouldn’t work. Did you or someone else already try that to know that it doesn’t work? I’m not asking because I don’t believe you; I’m asking to try to figure out the issue.

I’m not seeing why they’re not recognized at all on my computer. My Stars client says it uses Aurora although the animations look the same to me. My settings window has various Aurora settings. And the windows have the same ahk_class they always did: PokerStarsTableFrameClass. Maybe my client isn’t the same as yours yet as I know they rolled it out over time to different countries (I’m in the US).

Do you know how to use the WindowSpy tool that comes with AHK? Can you use it to see what the ahk_class of the table window is?
User avatar
boiler
Posts: 16767
Joined: 21 Dec 2014, 02:44

Re: AHK Script for Pokerstars Software / Aurora ?

30 Jan 2020, 07:41

hugoreis wrote:
30 Jan 2020, 07:00
Sorry for my intromission on this post, but i have a similar problem, i use a script for table view, without buttons, just table layout. But with Aurora enable or disable, doesnt work.
pokerplayer81 with Aurora disable it works your script???
im following this post, maybe someone can help both of us
Can you identify the table window’s ahk_class using the WindowSpy tool that comes with AHK?
hugoreis
Posts: 6
Joined: 29 Jan 2020, 07:10

Re: AHK Script for Pokerstars Software / Aurora ?

30 Jan 2020, 08:55

boiler wrote:
30 Jan 2020, 07:41
hugoreis wrote:
30 Jan 2020, 07:00
Sorry for my intromission on this post, but i have a similar problem, i use a script for table view, without buttons, just table layout. But with Aurora enable or disable, doesnt work.
pokerplayer81 with Aurora disable it works your script???
im following this post, maybe someone can help both of us
Can you identify the table window’s ahk_class using the WindowSpy tool that comes with AHK?
I dont know how to use that... but when i back home at night i will explore to see... the only thing that appears to me its when i close a table and pokerstars ask to me if im leaving or stay... this message appears on my script...but the tables dont
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: AHK Script for Pokerstars Software / Aurora ?

30 Jan 2020, 10:17

boiler wrote:
30 Jan 2020, 07:20
And the windows have the same ahk_class they always did: PokerStarsTableFrameClass.
Aurora window class is different. these guys will need to change all instances of PokerStarsTableFrameClass with GLFW30

and the coordinates for all the buttons clicks might be slightly changed, i forget

pokerplayer81
Posts: 8
Joined: 29 Jan 2020, 01:06

Re: AHK Script for Pokerstars Software / Aurora ?

30 Jan 2020, 10:37

Yes, boiler and guest3456, thank you so much !!!!!

I will replace all instances of PokerStarsTableFrameClass with GLFW30 and see if it works...
Attachments
1.jpg
Old Pokerstars Graphics Engine
1.jpg (169.72 KiB) Viewed 3799 times
2.jpg
Aurora Graphics Engine
2.jpg (157.25 KiB) Viewed 3799 times
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: AHK Script for Pokerstars Software / Aurora ?

30 Jan 2020, 11:32

pokerplayer81 wrote:
30 Jan 2020, 10:37
Yes, boiler and guest3456, thank you so much !!!!!

I will replace all instances of PokerStarsTableFrameClass with GLFW30 and see if it works...
you might need to change the coordinates of the buttons as well

as you can see in the two screenshots you posted, just look at the Chat,Notes,Stats,Info tabs above the chatbox, all of those tab buttons are larger and wider.. i believe all the betting buttons including fold/call/bet have probably shifted as well, so if your F1-F12 hotkeys fail, they might be clicking the wrong locations

pokerplayer81
Posts: 8
Joined: 29 Jan 2020, 01:06

Re: AHK Script for Pokerstars Software / Aurora ?

30 Jan 2020, 12:47

Yes i know i already changed the location of some buttons... It works perfectly now on AURORA and i can play FULL SCREEN AGAIN ;)
Thank you so much !!! ;)
guest3456, do you want 10,00 € via paypal as a reward ?
Then send me PM ;)

best wishes and thanks for your support...
hugoreis
Posts: 6
Joined: 29 Jan 2020, 07:10

Re: AHK Script for Pokerstars Software / Aurora ?

30 Jan 2020, 15:36

Great its already working for you but for me didn't work...
my code its below

Code: Select all

; freo's Stacked Table Previewer for PokerStars v1.0
; Shows thumbnails of all stacked tables in a preview window
; Only works in Vista/Windows7 with aero enabled
; 'clay973' on PS for donations


#SingleInstance Force
#NoEnv

DetectHiddenWindows,On
SetTitleMatchMode, 2

OnMessage(0x201,"activatethumbsource")
;------------------------------------------------------------------------------------------------------------------
;User defined settings
hostwindoww=800         ;Host preview window width             
hostwindowh=990        ;Host preview window height
hostwindowx=870         ;Host preview window x position on screen
hostwindowy=0           ;Host preview window y position on screen
ptablebasew=483         ;Poker table base resolution (For stars this is the smallest table resolution (483 x 353)
ptablebaseh=353
refreshrate=3000        ;Number of seconds to wait between refreshes (1000 = 1 second)
;------------------------------------------------------------------------------------------------------------------


hModule := DllCall("LoadLibrary", "str", "dwmapi.dll")       ;Load dwmapi.dll for handling thumbnails
ptablehwratio := ptablebaseh / ptablebasew                  ;Ratio used for scaling thumbnail window size
SysGet, borderxa, 45                                         ;Size of the x window 3D border
Sysget, borderya, 46                                         ;Size of the y window 3D border
Sysget, captionha, 4                                         ;Size of the caption
Sysget, borderxb, 5                                          ;Size of the x window normal border
Sysget, borderyb, 6                                          ;Size of the y window normal border
borderx := borderxa + borderxb                               ;Total size of the x border
bordery := borderya + borderyb                               ;Total size of the y border
captionh := captionha + borderyb                             ;Total size of the caption
clientareah := hostwindowh - bordery - captionh              ;Height of the area thumbnail windows can be placed in
clientareaw := hostwindoww - borderx - borderx               ;Width of the area thumbnail windows can be placed in

;Create preview window
Gui, 99: +LastFound +LabelForm1_                            
target := WinExist()
Gui, 99: Show, w%hostwindoww% h%hostwindowh% x%hostwindowx% y%hostwindowy%, Table Preview

;Create Empty variables for storing thumbnail links
Loop, 98
{
    source%A_Index%_hnd:=0
    source%A_Index%_thumb:=0
    source%A_Index%_wide:=0
}

;Show existing tables
;WinGet, list, list, Logged In as, ,PokerStars Lobby        ;Get list of open tables
;WinGet, list, list, Windows Internet Explorer              ;For testing. Shows internet explorer windows instead of poker tables
 WinGet, list, list, ahk_class PokerStarsTableFrameClass
 
;Need to filter out false windows that have no controls
tblcount:=0
Loop, %list%
{
    thisid:=list%A_Index%
    WinGet,ctrllist,ControlList,ahk_id %thisid%
    ;WinGetTitle,thistitle,ahk_id %thisid%
    If (ctrllist != "") and (thisid > 0)
    {
        tblcount+=1
        tblcount%tblcount%:=list%A_Index%
    }    
}

currentcnt:=tblcount                           

;Calculate child window size and number per row
tablesw := numtablesw(currentcnt)
childwinw := Floor(calcwinsize(tablesw, currentcnt))
childwinh := Floor(childwinw * ptablehwratio)

;Create child windows for tables already open
Loop, %tblcount%
{
    thisid:=tblcount%A_Index%
    addchild(A_Index, thisid)
}


;Infinite loop to monitor table opens, closes & resizes.
Loop,
{    
    Sleep, %refreshrate%
    
    wasredrawn:=0
    
    ;Find any closed tables
    Loop, 98
    {
        thishnd:=source%A_Index%_hnd
        if (thishnd > 0)
        {
            IfWinNotExist, ahk_id %thishnd%
            {
                source%A_Index%_hnd:=0
                source%A_Index%_thumb:=0
                source%A_Index%_wide:=0
            }
        }
    }
        
    ;Get new list of tables
    ;WinGet, list, list, Logged In as, ,PokerStars Lobby        ;Get list of open tables
    ;WinGet, list, list, Windows Internet Explorer               ;For testing. Shows internet explorer windows instead of poker tables
    WinGet, list, list, ahk_class PokerStarsTableFrameClass

    ;Need to filter out false windows that have no controls
    tblcount:=0
    Loop, %list%
    {
        thisid:=list%A_Index%
        WinGet,ctrllist,ControlList,ahk_id %thisid%
        WinGetTitle,thistitle,Title,ahk_id %thisid%
        If (ctrllist != "") and (thisid > 0)
        {
            tblcount+=1
            tblcount%tblcount%:=list%A_Index%
        }    
    }    
    
    ;Find any new tables
    Loop, %tblcount%
    {
        thishnd:=tblcount%A_Index%
        found:=0
        Loop,98
        {
            if (source%A_Index%_hnd = thishnd)
            {
                found:=1
                break            
            }
        }
        
        ;New table found
        if (found = 0)
        {
            ;Find first avail slot
            newslot:=0
            Loop,98
            {
                if (source%A_Index%_hnd = 0)
                {
                    newslot:=A_Index
                    break                    
                }
            }

            ;Determine whether an existing slot is available or a recalculation is required as its a new slot.
            if (newslot <= currentcnt)         ;Existing slot taken, no recalc required
            {
                addchild(newslot, thishnd)
            }
            else                                ;Need to recalculate to determine if new rows or columns are required
            {
                currentcnt += 1
                oldcols:=tablesw
                oldw:=childwinw
                tablesw := numtablesw(currentcnt)
                childwinw := Floor(calcwinsize(tablesw, currentcnt))
                childwinh := Floor(childwinw * ptablehwratio)
                if (oldcols = tablesw) and (oldw = childwinw)       ;Still a slot left at the end of the current config
                    addchild(newslot, thishnd)
                else                                                ;Need to redraw all thumbnails with diff config
                {
                    Loop, 98
                    {
                        unregisterthumbnail(source%A_Index%_thumb)            ;Unregister existing thumbs                         
                    }
                    
                    Loop, %tblcount%
                    {
                        if(A_Index < tblcount)
                        {
                            thisid:=source%A_Index%_hnd
                            addchild(A_Index, thisid)
                        }
                        else
                        {
                            thisid:=tblcount%A_Index%
                            addchild(A_Index, thishnd)
                        }
                    }
                    wasredrawn:=1
                }
            }
        }
    }
    
    ;Check if any tables have been resized and if so, redraw
    if (wasredrawn = 0)                 
    {
        Loop, %tblcount%
        {
            retable:=source%A_Index%_hnd
            WinGetPos,wx,wy,ww,wh,ahk_id %retable%
            if (ww != source%A_Index%_wide)
            {
                unregisterthumbnail(source%A_Index%_thumb)
                addchild(A_Index, retable)
            }
        }
    }
}

Return


;Function to register the thumbnail to the GUI
registerthumbnail(target, source, thumbnum)
{
    Global    
    
    VarSetCapacity(thumbnail,4,0)
    hr1:=DllCall("dwmapi\DwmRegisterThumbnail",UInt,target,UInt,source,UInt, &thumbnail)
    thumbnail:=Numget(thumbnail,0,true)
    source%thumbnum%_hnd:=source
    source%thumbnum%_thumb:=thumbnail
    
    updatethumbnail(source, thumbnum, thumbnail)
}

;Function sets thumbnail properties and displays
updatethumbnail(source, thumbnum, thumbnail)
{    
    /*
    DWM_TNP_RECTDESTINATION (0x00000001)
    Indicates a value for rcDestination has been specified.
    DWM_TNP_RECTSOURCE (0x00000002)
    Indicates a value for rcSource has been specified.
    DWM_TNP_OPACITY (0x00000004)
    Indicates a value for opacity has been specified.
    DWM_TNP_VISIBLE (0x00000008)
    Indicates a value for fVisible has been specified.
    DWM_TNP_SOURCECLIENTAREAONLY (0x00000010)
    Indicates a value for fSourceClientAreaOnly has been specified.
    */
    
    Global  
    
    dwFlags:=0X1 | 0x2 | 0x10
    opacity:=150
    fVisible:=1
    fSourceClientAreaOnly:=1
    
    ;Determine where to position thumbnail based on its number
    rownum := Ceil(thumbnum / tablesw)
    colnum := Mod(thumbnum - 1,tablesw)
    newx := ((colnum) * childwinw)
    newy := ((rownum - 1) * childwinh)
    neww := newx + childwinw
    newh := newy + childwinh
    
    WinGetPos,wx,wy,ww,wh,ahk_id %source%
    
    VarSetCapacity(dskThumbProps,45,0)
    ;struct _DWM_THUMBNAIL_PROPERTIES
    NumPut(dwFlags,dskThumbProps,0,"UInt")
    NumPut(newx,dskThumbProps,4,"Int")                     ;x coord in relation to the target
    NumPut(newy,dskThumbProps,8,"Int")                     ;y coord in relation to the target
    NumPut(neww,dskThumbProps,12,"Int")                   ;x coord of bottom of the thumb in relation to the target
    NumPut(newh,dskThumbProps,16,"Int")                   ;y coord of the right edge of the thumb in relation to the target
    NumPut(0,dskThumbProps,20,"Int")                      ;x coord of target to start thumb
    NumPut(0,dskThumbProps,24,"Int")                      ;y coord of target to start thumb
    NumPut(ww,dskThumbProps,28,"Int")                    ;x coord of bottom of the thumb in relation to the source
    NumPut(wh,dskThumbProps,32,"Int")                    ;y coord of the right edge of the thumb in relation to the source
    NumPut(opacity,dskThumbProps,36,"UChar")
    NumPut(fVisible,dskThumbProps,37,"Int")
    NumPut(fSourceClientAreaOnly,dskThumbProps,41,"Int")
    hr2:=DllCall("dwmapi\DwmUpdateThumbnailProperties","UInt",thumbnail,"UInt",&dskThumbProps) 
    source%thumbnum%_wide:=ww
}


unregisterthumbnail(unthumbnail)
{
    ur1:=DllCall("dwmapi.dll\DwmUnregisterThumbnail", "UInt", unthumbnail)
}


;Function to determine the optimal number of tables wide to show in preview window
numtablesw(totaltables)
{
    if(totaltables > "1")
    {   
        global clientareah
        global clientareaw
        global ptablehwratio
        
        wsize := 0
        wnum := 0
        
        ;The loop value will equal the number of tables per row
        Loop,%totaltables%
        {            
            thiswsize := floor(calcwinsize(A_Index, totaltables))
            
            if (thiswsize >= wsize)
            {    
                wsize := thiswsize
                wnum := A_Index
            }
        }
        return, %wnum%
    }
    Else 
    {
        return, 1
    }
}

;Calculates child window size based on number of tables per row
calcwinsize(tblperrow, totaltables)
{
    global clientareaw
    global clientareah
    global ptablehwratio
    
    calcwsize := clientareaw / tblperrow
    calcrownum := ceil(totaltables / tblperrow)
            
    if ((clientareah / calcrownum) < (ptablehwratio * calcwsize))
    {
        calcwsize := (1 / ptablehwratio) * (clientareah / calcrownum)
    }
    
    Return, calcwsize    
}

;Adds child window to the preview pane
addchild(usenum, previewid)
{
    Global childwinw
    Global childwinh
    Global hostwindoww
    Global hostwindowh
    Global target

    if (usenum > 0) ;If usenum is 0 it is not part of the initial load of existing windows
    {
        registerthumbnail(target, previewid, usenum)
        Return
    }
}

Form1_Close:
	ExitApp
return

activatethumbsource(wparam)
{
local id,win,mousex,mousey,thumbx,thumby,thumbleftxpos,thumbrightxpos,thumbtopypos,thumbbottomypos
coordmode,mouse,relative
mousegetpos,mousex,mousey,id
if (id=target)
{
thumbx:=borderxb+borderxa
thumby:=captionh
loop 98
{
 thumbleftxpos:=thumbx
 thumbrightxpos:=thumbx+childwinw
 thumbtopypos:=thumby
 thumbbottomypos:=thumby+childwinh
 if (mousex>thumbleftxpos) & (mousex<thumbrightxpos) & (mousey>thumbtopypos) & (mousey<thumbbottomypos)
 {
  win:=source%A_Index%_hnd
  winactivate,ahk_id%win%
  break
 }
 thumbx+=childwinw
 if (thumbx+childwinw>hostwindoww)
 {
  thumby+=childwinh
  thumbx:=borderxb+borderxa
 }
}
}
}
return

and my lobby and window spy its below
AHK.jpg
AHK.jpg (156.32 KiB) Viewed 3689 times


and on youtube on this video on min 3.30 you can see how works before...

[youtube]https www.youtube.com /watch?v=TzvsidPnnTY&t=24s[/youtube] Broken Link for safety


i already try to change PokerStarsFrameClass for GLFW30 but dont do nothing...

Can anyone help me?


Thanks
pokerplayer81
Posts: 8
Joined: 29 Jan 2020, 01:06

Re: AHK Script for Pokerstars Software / Aurora ?

30 Jan 2020, 17:33

hi hugoreis this is my new script ...
maybe you can use parts of it...

Code: Select all

WheelUp::
MouseGetPos,,,tableID
WinGetClass, tableIDclass, ahk_id %tableID%
if tableIDclass = GLFW30
{
WinSet, Bottom,, ahk_id %tableID%
}
else
{
Send {WheelUp}
}
return

WheelDown::
MouseGetPos,,,tableID
WinGetClass, tableIDclass, ahk_id %tableID%
if tableIDclass = GLFW30
{
WinGet, tableID, IDLast, ahk_class GLFW30
WinSet, Top,, ahk_id %tableID%
}
else
{
Send {WheelDown}
}
return

; FOLD (OK)
F1::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton11
return
}
else IfWinActive, ahk_class GLFW30
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.014
YPOS:=height*0.777
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
}

; CHECK/CALL (OK)
F2::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton12
return
}
else IfWinActive, ahk_class GLFW30
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.745
YPOS:=height*0.935
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
}

; BET/RAISE (OK)
F3::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton13
return
}
else IfWinActive, ahk_class GLFW30
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.9125
YPOS:=height*0.935
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
}

; INFO/UPDATE/BACK (OK)
F4::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton13
return
}
else IfWinActive, ahk_class GLFW30
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.405
YPOS:=height*0.82
MouseClick, left, XPOS, YPOS, 1, 0
XPOS:=width*0.43
YPOS:=height*0.86
MouseClick, left, XPOS, YPOS, 1, 0
XPOS:=width*0.745
YPOS:=height*0.888
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
} 

; DECREASE BET SIZE (OK)
F5::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton13
return
}
else IfWinActive, ahk_class GLFW30
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.738
YPOS:=height*0.864
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
} 

; INCREASE BET SIZE (OK)
F6::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton13
return
}
else IfWinActive, ahk_class GLFW30
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.98
YPOS:=height*0.864
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
}

; SIT OUT AFTER NEXT BIG BLIND (OK)
F7::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton13
return
}
else IfWinActive, ahk_class GLFW30
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.014
YPOS:=height*0.752
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
} 

; SIT OUT AFTER NEXT HAND (OK)
F8::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton13
return
}
else IfWinActive, ahk_class GLFW30
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.014
YPOS:=height*0.728
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
} 

; ALL IN (OK)
F9::
IfWinActive,ahk_class FTC_TableViewFull
{
ControlClick, FTCSkinButton13
return
}
else IfWinActive, ahk_class GLFW30
{
WinGetPos X, Y, width, height, A
XPOS:=width*0.955
YPOS:=height*0.81
MouseClick, left, XPOS, YPOS, 1, 0
Sleep, 10
return
} 

SetTitleMatchMode, 2
 
~pgup::
WinMaximize, PokerStars Lobby
return
 
~pgdn::
WinMinimize, PokerStars Lobby
return
[Mod edit: [code][/code] tags added.]
User avatar
boiler
Posts: 16767
Joined: 21 Dec 2014, 02:44

Re: AHK Script for Pokerstars Software / Aurora ?

30 Jan 2020, 19:41

hugoreis wrote:
30 Jan 2020, 15:36
i already try to change PokerStarsFrameClass for GLFW30 but dont do nothing...
Did you change it in both places it appears?
hugoreis
Posts: 6
Joined: 29 Jan 2020, 07:10

Re: AHK Script for Pokerstars Software / Aurora ?

31 Jan 2020, 08:57

boiler wrote:
30 Jan 2020, 19:41
hugoreis wrote:
30 Jan 2020, 15:36
i already try to change PokerStarsFrameClass for GLFW30 but dont do nothing...
Did you change it in both places it appears?
Hi boiler, yes...i change both... but i put here the code before i change for better analysis.
I try to do the same that pokerplayer81 but didnt work.
Before Aurora it works perfectly but now :( ... any more suggestions to change on my code?
I really dont understand this code, i copy/past from a poker forum and use it many years.

Thanks for your help
User avatar
boiler
Posts: 16767
Joined: 21 Dec 2014, 02:44

Re: AHK Script for Pokerstars Software / Aurora ?

31 Jan 2020, 14:32

hugoreis wrote:
31 Jan 2020, 08:57
Hi boiler, yes...i change both... but i put here the code before i change for better analysis.
I try to do the same that pokerplayer81 but didnt work.
Before Aurora it works perfectly but now :( ... any more suggestions to change on my code?
I really dont understand this code, i copy/past from a poker forum and use it many years.

Thanks for your help
It may just be that the Aurora graphics don’t allow for the window images to be captured for your thumbnail images, similar to the way that a lot of newer games look like a black screen when you try to scrape image information from them. Apparently my Stars client hasn’t been updated to full Aurora graphics yet, so I can’t test it out. Sorry. Perhaps someone else will be able to spot the problem.
Tcharr
Posts: 41
Joined: 25 Jan 2020, 15:38

Re: AHK Script for Pokerstars Software / Aurora ?

01 Feb 2020, 07:20

@hugoreis
Did you also adjust your coordinates for the new graphics layout?
User avatar
boiler
Posts: 16767
Joined: 21 Dec 2014, 02:44

Re: AHK Script for Pokerstars Software / Aurora ?

01 Feb 2020, 09:40

Tcharr wrote:
01 Feb 2020, 07:20
@hugoreis
Did you also adjust your coordinates for the new graphics layout?
His script isn’t clicking locations on windows. It is capturing images of the various table windows and displaying them as thumbnail images. This allows him to play several tables stacked on top of each other while still seeing a miniature version of each table.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 46 guests