![]() |
|
#31
|
|||
|
|||
|
Well, before I go to bed...
I placed the following code in to help me debug... Starting with (Original) Line 180: <font class="small">Code:</font><hr /><pre> WinGetPos, x, y, w, h, ahk_id%winID% px := Floor((w/800) * 400) py := Floor((h/573) * 80) Casey_Var = winID is %winID% px is %px% and py is %py% msgbox %Casey_Var% </pre><hr /> Then again under the CR_PostLeftClick sub: <font class="small">Code:</font><hr /><pre> msgbox % "I am going to click here: " . ((y*65536)+x) Postmessage 0x201, 0x0001, ((y*65536)+x), , ahk_id%table_id% Postmessage 0x202, 0, ((y*65536)+x), , ahk_id%table_id% </pre><hr /> The values of those variables were: winID = 0x2f01c0 px = 400 py = 80 <<Click Location>> = 5243280 Now if only I could correlate that location with my option button, I suppose I could fix this [img]/images/graemlins/frown.gif[/img] --Casey |
|
#32
|
|||
|
|||
|
[ QUOTE ]
[ QUOTE ] OK....out of curiosity, why is this? Is it difficult to detect what your stack size is? [/ QUOTE ] Yes, exactly. I had to get stack size from the hand history file, and that would make the numbers lag by three hands. It was too messy to handle the script "support", so I pulled the plug. Adde [/ QUOTE ] Makes sense. Thx. |
|
#33
|
|||
|
|||
|
It seems like the clicking fails.
This test script will click every 10th pixel within 200-600 (x) and 0-200 (y). Open a full table, activate it and click F10 to test this out. If the options dialog is not opened (before the script ends, which is indicated by a sound beep), well, I don't know what the error is. If it does open, a message box will tell you what (x,y) were used. Replace coordinates (400,80) in ChipReloader with these. Adde F10:: gosub TestStars return TestStars: SetTitleMatchMode, 2 WinGet, id, ID, A x := 190 Loop, 40 { x := x + 10 y := -10 Loop, 20 { y := y + 10 CR_PostLeftClick(x, y, id) sleep, 10 IfWinExist, Options, Add More Chips { msgbox x=%x% y=%y% exit } } } soundbeep, , 100 return |
|
#34
|
|||
|
|||
|
[ QUOTE ]
[ QUOTE ] I dont think the script is working properly for me on PS. It options the options menu but I need to manually choose the "Add More Chips" button for the script to complete. [/ QUOTE ] This is fixed now. Adde [/ QUOTE ] It still doesn't work fine for me. I just recopied the latest version and I still need to press the chips tray for the command to complete. |
|
#35
|
|||
|
|||
|
[ QUOTE ]
It still doesn't work fine for me. I just recopied the latest version and I still need to press the chips tray for the command to complete. [/ QUOTE ] Have you tried the test script I posted just here above? Adde |
|
#36
|
|||
|
|||
|
Weeeee! Works great! Ok, so here it is for folks who know nothing about coding (assuming you were having the same problem as I was):
Copy this script and save it as ImaDufas.ahk: <font class="small">Code:</font><hr /><pre> F10:: gosub TestStars return TestStars: SetTitleMatchMode, 2 WinGet, id, ID, A x := 190 Loop, 40 { x := x + 10 y := -10 Loop, 20 { y := y + 10 CR_PostLeftClick(x, y, id) sleep, 10 IfWinExist, Options, Add More Chips { msgbox x=%x% y=%y% exit } } } soundbeep, , 100 return CR_PostLeftClick(x, y, table_id) { ; ### 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!!!). Postmessage 0x201, 0x0001, ((y*65536)+x), , ahk_id%table_id% Postmessage 0x202, 0, ((y*65536)+x), , ahk_id%table_id% } </pre><hr /> Then double-click the file to run it Next, open a table of your choice (you don't have to sit down at the table....it can be a full table....just open a table up of the game you play) Then hit F10 After a brief period, the options window should open. At the same time, a message will pop up saying x= <<some number>> y= <<some number>>. Now open the ChipReloader.ahk file for editting (use NotePad) With the file open in Notepad, hit <CTRL><G> to open the goto dialog. Type in 180 Your cursor will be on a line that says: <font class="small">Code:</font><hr /><pre> px := Floor((w/800) * 400) </pre><hr /> Change the 400 to whatever value x= <<some number>> was in the test. The next line of code is: <font class="small">Code:</font><hr /><pre> py := Floor((h/573) * 80) </pre><hr /> Change the 80 to whatever value x= <<some number>> was in the test. Now save the file (ChipReloader.ahk), and run it. Everything should work out just fine. BTW....My x & y were 360 & 40, respectively.... Casey P.S. Thanks Adde, you sure went through a lot of trouble to help me be even more lazy...Casey -------------------------Edit-------------------- I suppose that the Theme you are using on Stars could affect the XY location of the button, so for everyone else's sake, I'm using the "Hyper-Simple" theme (With a slight mod to the table foreground that I made. Hmm, I suppose I could attach that too. You may want to do something similar). It just displays the odds for outs up to 12 when you have 1 card to come (top) or 2 cards to come (bottom). Board cards do cover it up some, but it works great 4-tabling. If you need more info on how to use it, just ask (most of you probably don't use silly stuff like this anyway). Casey |
|
#37
|
|||
|
|||
|
[ QUOTE ]
Weeeee! Works great! Ok, so here it is for folks who know nothing about coding (assuming you were having the same problem as I was): Copy this script and save it as ImaDufas.ahk: <font class="small">Code:</font><hr /><pre> F10:: gosub TestStars return TestStars: SetTitleMatchMode, 2 WinGet, id, ID, A x := 190 Loop, 40 { x := x + 10 y := -10 Loop, 20 { y := y + 10 CR_PostLeftClick(x, y, id) sleep, 10 IfWinExist, Options, Add More Chips { msgbox x=%x% y=%y% exit } } } soundbeep, , 100 return CR_PostLeftClick(x, y, table_id) { ; ### 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!!!). Postmessage 0x201, 0x0001, ((y*65536)+x), , ahk_id%table_id% Postmessage 0x202, 0, ((y*65536)+x), , ahk_id%table_id% } </pre><hr /> Then double-click the file to run it Next, open a table of your choice (you don't have to sit down at the table....it can be a full table....just open a table up of the game you play) Then hit F10 After a brief period, the options window should open. At the same time, a message will pop up saying x= <<some number>> y= <<some number>>. Now open the ChipReloader.ahk file for editting (use NotePad) With the file open in Notepad, hit <CTRL><G> to open the goto dialog. Type in 180 Your cursor will be on a line that says: <font class="small">Code:</font><hr /><pre> px := Floor((w/800) * 400) </pre><hr /> Change the 400 to whatever value x= <<some number>> was in the test. The next line of code is: <font class="small">Code:</font><hr /><pre> py := Floor((h/573) * 80) </pre><hr /> Change the 80 to whatever value x= <<some number>> was in the test. Now save the file (ChipReloader.ahk), and run it. Everything should work out just fine. BTW....My x & y were 360 & 40, respectively.... Casey P.S. Thanks Adde, you sure went through a lot of trouble to help me be even more lazy...Casey -------------------------Edit-------------------- I suppose that the Theme you are using on Stars could affect the XY location of the button, so for everyone else's sake, I'm using the "Hyper-Simple" theme (With a slight mod to the table foreground that I made. Hmm, I suppose I could attach that too. You may want to do something similar). It just displays the odds for outs up to 12 when you have 1 card to come (top) or 2 cards to come (bottom). Board cards do cover it up some, but it works great 4-tabling. If you need more info on how to use it, just ask (most of you probably don't use silly stuff like this anyway). Casey [/ QUOTE ] Thx Adde and AceKQJT for helping me out with this. It works perfectly now on Stars. (x=360, y=40 for those interested). On Party though, if I have a table over the max buy in, a pop-up will appear saying that I have to enter a value over 0 and it will instantly open an Internet page to My Cashier so I can add chips. |
|
#38
|
|||
|
|||
|
Never mind boys. It all works perfectly on Party and Stars. I love you Adde.
|
|
#39
|
|||
|
|||
|
loving the script
|
|
#40
|
|||
|
|||
|
Hi, can this script be adjusted so that you reload to 20-BB? [img]/images/graemlins/cool.gif[/img]
|
![]() |
|
|