Two Plus Two Newer Archives

Two Plus Two Newer Archives (http://archives1.twoplustwo.com/index.php)
-   STT Strategy (http://archives1.twoplustwo.com/forumdisplay.php?f=38)
-   -   My PokerStars SNG AHK script (http://archives1.twoplustwo.com/showthread.php?t=240425)

Quetzo 03-19-2007 02:44 PM

Re: My PokerStars SNG AHK script
 
[ QUOTE ]
Only visible text in all pop ups is 'OK'

[/ QUOTE ]
Yep, the text on buttons is the only visible text in popups and most of them only have an OK-button. To differentiate popups from each other you have to use ImageSearch on the text that's not visible.

mrlucky007 03-23-2007 02:57 AM

Re: My PokerStars SNG AHK script
 
Just started using this and love it. Its much appreciated. Other then whats in this thread I know nothing about AHK's or script/codes. I just copied and pasted the script, but am wondering how I could change F1 from doing Cascade tables to Tile tables, and explain how I could figure this out. It would be much appreciated.

rubbishaka80 03-23-2007 07:34 AM

Re: My PokerStars SNG AHK script
 
[ QUOTE ]
Just started using this and love it. Its much appreciated. Other then whats in this thread I know nothing about AHK's or script/codes. I just copied and pasted the script, but am wondering how I could change F1 from doing Cascade tables to Tile tables, and explain how I could figure this out. It would be much appreciated.

[/ QUOTE ]

This has been answered above.

I never tried it myself, though.

lordTasse 03-24-2007 01:59 PM

Re: My PokerStars SNG AHK script
 
anyone got a good autotimebank script?

Finnisher 03-24-2007 04:23 PM

Re: My PokerStars SNG AHK script
 
[ QUOTE ]
anyone got a good autotimebank script?

[/ QUOTE ]
http://forumserver.twoplustwo.com/showfl...mp;#Post8921318

Gnumsploitz edited _dave_'s script so there's probably some extra stuff in there but it doesn't do anything else than click the timebank:

[ QUOTE ]
; #### StarsBuddyList ####

; AHK version: 1.0.46.03
; date: January 13, 2007
; version: 0.01
; author: _dave_ @ 2p2 forums
; thx to Roland & JukofYork for some of the functions


;--------------- SETTINGS -----------------------

border_colour := "ff0000"
border_size := 0
trans := 255
timebank_min := 10
timebank_max := 13
refresh_interval := 333

;--------------- END OF SETTINGS ----------------


#NoEnv
#SingleInstance, Force
SendMode Input
SysGet, border, 32
SysGet, caption, 4
last_table_id := ""
tablequeue := ""
SetTimer, refreshqueue, %refresh_interval%
return

refreshqueue:
ids := TableIDListStars()
Loop, Parse, tablequeue, `,
{
StringTrimLeft, this_id, A_LoopField, InStr(A_LoopField, "_")
if (!InStr(ids, this_id))
{
StringReplace, tablequeue, tablequeue, %A_LoopField%, , All
}
}
Loop, Parse, ids, `,
{
ControlGet, v, Visible, , Edit7, ahk_id%A_LoopField%
if (v)
{
;table is waiting
if (!InStr(tablequeue, A_LoopField))
{
DllCall("QueryPerformanceCounter", "Int64 *", CurrentQPC)
tablequeue := tablequeue . "," . CurrentQPC . "-" . A_TickCount . "_" . A_LoopField
}
}
else
{
if (InStr(tablequeue, A_LoopField))
{
StringReplace, tablequeue, tablequeue, %A_LoopField%, , All
}
}
}
tmp := ""
Loop, Parse, tablequeue, `,
{
if (InStr(A_LoopField, "0x"))
{
tmp := tmp . "," . A_LoopField
}
}
Sort, tmp, N D`,
tablequeue := CleanList(tmp)

;Msgbox, %tablequeue%
most_urgent_table := ""
Loop, Parse, tablequeue, `,
{
StringTrimLeft, most_urgent_table, A_LoopField, InStr(A_LoopField, "_")
break
}
tc := A_TickCount
Loop, Parse, tablequeue, `,
{
StringTrimLeft, waiting_time, A_LoopField, InStr(A_LoopField, "-")
StringTrimRight, waiting_time, waiting_time, ( StrLen(waiting_time) - (InStr(waiting_time, "_")-1) )
waiting_time := (tc - waiting_time) / 1000
;MsgBox, %waiting_time%
if (waiting_time > 10 && waiting_time < 13)
{
StringTrimLeft, waiting_table, A_LoopField, InStr(A_LoopField, "_")
timebank_x := 530
timebank_y := 440
relStarsClientPoint(waiting_table, timebank_x, timebank_y)
PostLeftClick(timebank_x, timebank_y, waiting_table, 0)
}

}

;Msgbox, %most_urgent_table%
makegui(most_urgent_table)
return





TableIDListStars()
{
SetTitleMatchMode 2
WinGet, id, id, PokerStars Lobby
WinGet, pid, PID, ahk_id%id%
WinGet, list, list, $ ahk_pid%pid%
Loop %list%
{
this_id := list%a_index%
If (this_id != id)
{
ids = %ids%,%this_id%
}
}
WinGet, list, list, MiniFT ahk_class AutoHotkeyGUI
Loop %list%
{
this_id := list%a_index%
ids = %ids%,%this_id%

}
StringTrimLeft, ids, ids, 1
return ids
}

;removes empty items (and trailing delimiters)
CleanList(list, del="") {
del := del="" ? "," : del
Loop {
StringReplace, list, list, %del%%del%, %del%, UseErrorLevel
If ! ErrorLevel
break
}
If InStr(list, del) = 1
StringTrimLeft, list, list, 1
If InStr(list, del,0,0) = StrLen(list)
StringTrimRight, list, list, 1
return list
}

makegui(id="")
{
;Msgbox, %id%
global last_table_id
global border_colour
global border_size
global trans

if (id != last_table_id)
{
last_table_id := id

if(!id)
{
Gui, 1: Cancel
Gui, 2: Cancel
Gui, 3: Cancel
Gui, 4: Cancel
return
}

WinGetPos, x, y, w, h, ahk_id%id%
global border
global caption
x := x + border
y := y + border + caption
w := w - (2*border)
h := h - (2*border) - caption



;top
guinum := 1
Gui, %guinum%: +Alwaysontop +Lastfound +Owner
Gui, %guinum%: Color, %border_colour%
WinSet, Transparent, %trans%
Gui, %guinum%: -Caption
Gui, %guinum%: Show, w%w% h%border_size% x%x% y%y% NoActivate

;left
guinum++
Gui, %guinum%: +Alwaysontop +Lastfound +Owner
Gui, %guinum%: Color, %border_colour%
WinSet, Transparent, %trans%
Gui, %guinum%: -Caption
Gui, %guinum%: Show, w%border_size% h%h% x%x% y%y% NoActivate

;bottom
guinum++
Gui, %guinum%: +Alwaysontop +Lastfound +Owner
Gui, %guinum%: Color, %border_colour%
WinSet, Transparent, %trans%
Gui, %guinum%: -Caption
y2 := y + h - border_size
Gui, %guinum%: Show, w%w% h%border_size% x%x% y%y2% NoActivate

;right
guinum++
Gui, %guinum%: +Alwaysontop +Lastfound +Owner
Gui, %guinum%: Color, %border_colour%
WinSet, Transparent, %trans%
Gui, %guinum%: -Caption
x2 := x + w - border_size
Gui, %guinum%: Show, w%border_size% h%h% x%x2% y%y% NoActivate

x3 := x + (w/2)
y3 := y + (h/2)
;SoundBeep, 750, 100
Coordmode, Mouse, Screen
;MouseMove, x3, y3, 0
}
}


PostLeftClick(x, y, table_id, activate=1, control_class="") {
; ### JUK: Send the down left click, then the mouse-up messages.
; NOTE: This is relative to the top left of the client area and NOT the top left of the
; window (ie: It *doesn't* include the title-bar like AHK's MouseClick does!!!).
If activate
WinActivate, ahk_id%table_id%
PostMessage, 0x201, 0x0001, ((y<<16)^x), %control_class%, ahk_id%table_id%
PostMessage, 0x202 , 0, ((y<<16)^x), %control_class%, ahk_id%table_id%
}

relStarsClientPoint(id, ByRef x, ByRef y)
{
global border
global caption
rw := 792
rh := 546
WinGetPos, , , w, h, ahk_id%id%
w := w - (2*border)
h := h - (2*border) - caption

x := Floor( (x / rw ) * w )
y := Floor( (y / rh) * h )

}


[/ QUOTE ]

the1champ 03-25-2007 08:50 PM

Re: My Pokerewards AHK script
 
DOES ANY 1 HAVE AN AUTO-REGISTER SCRIPT FOR POKEREWARS? POKER GAME PLZZZZZZZZ I NEED IT [img]/images/graemlins/smile.gif[/img] THANKZ! IF U DO IM ME AT PLAYERO696969 THANK YOU!

kozip 04-01-2007 09:39 AM

Re: My Pokerewards AHK script
 
@ finnisher: please tell me what the script from you last post does. does it only activate the timebank or does it have any hotkeys? does it kill popups and lobbies?

thank you.

fluorescenthippo 04-01-2007 09:51 PM

Re: My PokerStars SNG AHK script
 
where did the link to it go in this thread? i cant find it [img]/images/graemlins/frown.gif[/img] help please

Finnisher 04-01-2007 10:36 PM

Re: My Pokerewards AHK script
 
[ QUOTE ]
@ finnisher: please tell me what the script from you last post does. does it only activate the timebank or does it have any hotkeys? does it kill popups and lobbies?

thank you.

[/ QUOTE ]
That script only enables the timebank on every table, nothing else as far as I know. handsome's script kills popups and lobbies with a hotkey.

kozip 04-02-2007 06:42 AM

Re: My Pokerewards AHK script
 
thank you. but handsome´s script does not work properly with the most recent stars update.
-it does not most kill popups
-it often (like 20% of the tiems) gives an error message when it tries to register for a sng. it says something like "cold not register for the tournament, plesae contact the stars support"
does anyone have a fix?


All times are GMT -4. The time now is 02:30 AM.

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