Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Internet Gambling > Software
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 12-20-2006, 11:44 PM
Bowlboy Bowlboy is offline
Senior Member
 
Join Date: Aug 2006
Location: 25NL for now
Posts: 787
Default Re: Stars Buddy Search (new AHK script)

[ QUOTE ]
What does this mean?

Error: The same variable cannot be used for more than one control per window. The current thread will exit.

Specifically: v1

Line#
---> 323: Gui,Add,Button,v%a_index% ym gOpen,Open Tables

[/ QUOTE ]
I have no idea. I got the same thing two twice but each time I closed AHK and reopened it and it worked fine again.
Reply With Quote
  #22  
Old 12-20-2006, 11:50 PM
rubbishaka80 rubbishaka80 is offline
Member
 
Join Date: Jul 2005
Posts: 84
Default Re: Stars Buddy Search (new AHK script)

[ QUOTE ]
What does this mean?

Error: The same variable cannot be used for more than one control per window. The current thread will exit.

Specifically: v1

Line#
---> 323: Gui,Add,Button,v%a_index% ym gOpen,Open Tables

[/ QUOTE ]
Can somebody describe when exactly this error occurred? Is it reproduceable?
Reply With Quote
  #23  
Old 12-21-2006, 02:09 AM
jsnipes28 jsnipes28 is offline
Senior Member
 
Join Date: Jun 2005
Location: Playing Poker?
Posts: 4,150
Default Re: Stars Buddy Search (new AHK script)

I appreciate you doing this however:
[ QUOTE ]
Don't try this while playing Or you could turn off the auto popup option.

[/ QUOTE ]

The script is not going to be very useful if it does not work while you are playing.
Reply With Quote
  #24  
Old 12-21-2006, 03:21 AM
NoahSD NoahSD is offline
Senior Member
 
Join Date: Aug 2005
Posts: 8,925
Default Re: Stars Buddy Search (new AHK script)

Oh.. why don't you make the script turn of auto popup at first and then turn it back on when it's finished?
Reply With Quote
  #25  
Old 12-21-2006, 10:50 AM
rubbishaka80 rubbishaka80 is offline
Member
 
Join Date: Jul 2005
Posts: 84
Default Re: Stars Buddy Search (new AHK script)

[ QUOTE ]
What does this mean?

Error: The same variable cannot be used for more than one control per window. The current thread will exit.

Specifically: v1

Line#
---> 323: Gui,Add,Button,v%a_index% ym gOpen,Open Tables

[/ QUOTE ]
Apparently, this comes up, when you search twice and don't close the GUI in between. Should be easy to fix.
Reply With Quote
  #26  
Old 12-21-2006, 10:54 AM
rubbishaka80 rubbishaka80 is offline
Member
 
Join Date: Jul 2005
Posts: 84
Default Re: Stars Buddy Search (new AHK script)

[ QUOTE ]
Oh.. why don't you make the script turn of auto popup at first and then turn it back on when it's finished?

[/ QUOTE ]
Yeah, I thought about this, it would be doable.

You still could not play i.e. click on tables, while the search runs...
Reply With Quote
  #27  
Old 12-21-2006, 02:09 PM
davidwilcock davidwilcock is offline
Member
 
Join Date: Jul 2005
Posts: 58
Default Re: Stars Buddy Search (new AHK script)

[ QUOTE ]
[ QUOTE ]
What does this mean?

Error: The same variable cannot be used for more than one control per window. The current thread will exit.

Specifically: v1

Line#
---> 323: Gui,Add,Button,v%a_index% ym gOpen,Open Tables

[/ QUOTE ]
Apparently, this comes up, when you search twice and don't close the GUI in between. Should be easy to fix.

[/ QUOTE ]

Cool, cheers and many thanks for this
Reply With Quote
  #28  
Old 12-23-2006, 11:47 PM
rubbishaka80 rubbishaka80 is offline
Member
 
Join Date: Jul 2005
Posts: 84
Default Re: Stars Buddy Search (new AHK script)

[ QUOTE ]
Oh.. why don't you make the script turn of auto popup at first and then turn it back on when it's finished?

[/ QUOTE ]
I added an option to do exactly this plus some bug fixes.

<font class="small">Code:</font><hr /><pre> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Code begins here ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;------------------------------------------------------------------------------------------------
; Stars Buddy Search v0.3
;------------------------------------------------------------------------------------------------
; Date: 2006-12-19
; AHK version: 1.0.44.14
;------------------------------------------------------------------------------------------------
; Author(s): rubbishaka80 @ 2+2 forums
; Contact: poker at postsack dot cjb dot net
;------------------------------------------------------------------------------------------------
; changes: add option to open all buddies tables immediately
; add temporarily turn-off of auto popup
;
;
; credits: wildzer0, handsome, Adde
;------------------------------------------------------------------------------------------------


; Set what hotkeys should start buddy search.
; Leave empty (=) if you don't want to use a hotkey.
; List of available hotkeys: http://www.autohotkey.com/docs/KeyList.htm
sb_hotkey = F9

; If you use the auto popup tables option in the PokerStars software, it greatly interferes
; with this script. Therefore this script deactivates the option. If you want to re-activate
; it afterwards, set this value to 1. If you don't use the option at all, set this value to 0.
sb_useAutoPopup = 1

; Set location of your buddy file here. Relative to the path of the script.
sb_buddyFile = buddies.txt

; opens all tables your buddies are playing on immediately(1) or not (0)
sb_openAllTables=0

;clear search list in pokerstars prior to searching (1) or not (0)
sb_clearSearchList = 0

;_________________________________________________ _______________________________________________
;
; DO NOT EDIT BELOW HERE
;_________________________________________________ _______________________________________________

;;;;;;;;;;;;;;;;;;;;auto-execute;;;;;;;;;;;;;;;;;
#NoEnv
#SingleInstance Ignore
#Persistent

sb_scriptpad_command_header = Buddies
sb_scriptpad_command_name = Find Online Buddies
sb_scriptpad_command_label = sb_OnlineBuddy_Label
sb_scriptpad_command_enabled = 1

ahk_version = 1.0.44.14
if A_AhkVersion &lt; %ahk_version%
{
msgbox, 4,
, This script needs AutoHotkey version %ahk_version% or newer (you are using version %A_AhkVersion%)
. Script will exit`n`nGo to web page and download new version now?
IfMsgBox, Yes
Run, http://www.autohotkey.com
ExitApp
}
Hotkey, %sb_hotkey%, sb_OnlineBuddy_Label, UseErrorLevel

goto sb_Scriptpad_End

;;;;;;;;;;;;;;;labels;;;;;;;;;;;;;;




sb_FindBuddy_Label:
sb_FindBuddy()
return

sb_Delete_Label:
sb_ClearSearchList()
return

sb_OnlineBuddy_Label:
if (sb_clearSearchList=1)
sb_ClearSearchList()
sb_OnlineBuddy()

return

sb_Open:
ControlGet, tableNumber, choice,,combobox%A_GuiControl%

sb_openTablesForBuddy(names%A_GuiControl%,tableNum ber)
return

sb_CloseGui:
sb_CloseGui()
return
;;;;;;;;;;;;;;;functions;;;;;;;;;;;;;
sb_EnablePopups(enable)
{
if (not sb_checkPokerstarsIsRunning())
{
msgBox, Pokerstars is not running
return
}
SetTitleMatchMode 1
WinActivate, PokerStars Lobby
WinwaitActive, PokerStars Lobby

WinMenuSelectItem, PokerStars Lobby ,, Options, Advanced Multi

WinActivate, Advanced
WinwaitActive, Advanced

ControlGet, vH, checked, , Button3
if (vH=1)
{
if (enable=false)
{
ControlClick, Button3
}

}
else
{
if (enable=true)
{
ControlClick, Button3
}
}
ControlClick, Button1

}
sb_CloseGui()
{
gui, destroy

return
}
sb_checkPokerstarsIsRunning()
{
Process, Exist, Pokerstars.exe
if (ErrorLevel &lt;&gt; 0)
return (true)

return (false)
}
sb_ClearSearchList()
{
if (not sb_checkPokerstarsIsRunning())
{
msgBox, Pokerstars is not running
return
}
SetTitleMatchMode 1
WinActivate, PokerStars Lobby
WinwaitActive, PokerStars Lobby

WinMenuSelectItem, PokerStars Lobby ,, Requests, Find a Player


WinWait, %A_SPACE%Find Player, , 3
WinActivate, %A_SPACE%Find Player
WinWaitActive, %A_SPACE%Find Player

ControlGet, List, List,, ComboBox1
Loop, Parse, List, `n
{
Control, choose, 1, Combobox1
ControlClick, Button3
}

Send, {Esc}
}
sb_FindBuddy()
{

SetTitleMatchMode 1
IfWinNotExist PokerStars Lobby - Logged in
return

InputBox, UserInput, Stars Buddy Search, Enter username to search for.
if ErrorLevel
return
else

InputBox, Index, Stars Buddy Search, How many tables do you want to open?
if ErrorLevel
return
else


sb_openTablesForBuddy(UserInput, Index)

}


sb_openTablesForBuddy(UserInput, Index)
{

Tables := 0
sleep, 100
Loop %Index%
{
SetTitleMatchMode 1
WinActivate, PokerStars Lobby
WinwaitActive, PokerStars Lobby

WinMenuSelectItem, PokerStars Lobby ,, Requests, Find a Player
Send, %UserInput% {Enter}

WinWait, %A_SPACE%Find Player, , 3
WinActivate, %A_SPACE%Find Player
WinWaitActive,%A_SPACE%Find Player
Send {Tab}{Tab}

Loop %Tables%
{
Send {Down}
Sleep 100
}
Tables++
Send {Enter}
Sleep 500

}
}


sb_onlineBuddy()
{
global sb_buddyFile
global tablelist
global namelist
global sb_openalltables
global sb_useAutoPopup
tablelist=
namelist=

sb_CloseGui()
sb_enablePopups(false)

if (not sb_checkPokerstarsIsRunning())
{
msgBox, Pokerstars is not running
return
}


ifnotexist, %sb_buddyFile%
{
msgBox, Buddy File "%sb_buddyFile%" not found
return
}
Loop, Read, %sb_buddyFile%
{

SetTitleMatchMode 1
WinActivate, PokerStars Lobby
WinwaitActive, PokerStars Lobby

WinMenuSelectItem, PokerStars Lobby ,, Requests, Find a Player
WinWait, %A_SPACE%Find Player, , 3
WinActivate, %A_SPACE%Find Player
Send, %A_LoopReadLine% {Enter}

Loop
{
Sleep, 100
IfWinExist, PokerStars, Not Found
{
Send, {Enter}
break
}

ifWinExist, %A_SPACE%Find Player


{
number:=countTables()
Send, {Esc}

if (sb_openAllTables=1)
{

sb_openTablesForBuddy(A_LoopReadLine,number)

}
else
{

namelist=%namelist%%A_LoopReadLine%|
tableList=%tablelist%%number%|
}

break
}
}

}
if (sb_useAutoPopup=1)
{
sb_enablePopups(true)
}

if (sb_openAllTables=0)
{

sb_buildGui()
}



}

countTables()
{
WinActivate, Find Player
send {down}
send {down}
number:=1

loop
{
send {down}
y:=(number*13)+44

PixelGetColor, color, 200, %y%

if color=0xffffff
{
number++
}
else
{
break
}
}
return number
}
sb_buildGUI()
{


global

StringSplit, names, namelist, |
StringSplit, tables, tablelist, |
arraycount=% names0-1

if (arraycount &lt;1)
{
msgbox, No one online :-(
return
}



loop,%ArrayCount%
Gui, Add, Text,, % names%A_Index%

gui, add, button,gsb_CloseGui,close

loop,%ArrayCount%
{

strNumber:=""
loop, % tables%A_Index%
strNumber=%strNumber%%A_Index%|
strNumber=%strNumber%|

if (A_Index=1)
Gui, Add, DropDownList, ym w40, %strNumber%
else
Gui, Add, DropDownList,w40, %strNumber%

}

loop,%ArrayCount%
{

if (A_Index=1)
Gui, Add, Button,v%A_Index% ym gsb_Open, Open Tables
else
Gui, Add, Button,v%A_Index% gsb_Open, Open Tables
}
Gui, Show,,Stars Buddy Search v0.3
return
}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; scriptpad ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

sb_Scriptpad_End:
; Do nothing. This is needed to work with Scriptpad.

</pre><hr />
Reply With Quote
  #29  
Old 12-25-2006, 04:40 PM
semipro50 semipro50 is offline
Member
 
Join Date: Sep 2002
Posts: 31
Default Re: Stars Buddy Search (new AHK script)

This look like a very useful tool. I have tried to set this up but I seem to be doing something wrong. Would some one please provided me step by step instructions so I can use this script.

Thank you in advance
Reply With Quote
  #30  
Old 12-26-2006, 09:38 PM
rubbishaka80 rubbishaka80 is offline
Member
 
Join Date: Jul 2005
Posts: 84
Default Re: Stars Buddy Search (new AHK script)

Step-by-step:

1. download &amp; install ahk from autohotkey.com
2. on your desktop: right click -&gt; new -&gt; ahk script; give some name i.e buddysearch.ahk
3. right click on buddysearch.ahk -&gt; edit script
4. copy from message to editor (make sure you get everything in the code environment)
5. save &amp; exit
6. start pokerstars &amp; login
7. double click script
7b press F9

At least you should be told now, that the file buddies.txt is missing [img]/images/graemlins/wink.gif[/img]

8. create a textfile, name it buddies.txt, enter all your buddies - one line for each
9. save &amp; exit
10. press F9

Hope this helps.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:55 AM.


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