Seedorf Posted July 15, 2006 Share Posted July 15, 2006 (edited) Hi i was wondering if someone could help me? I want to add a script to another one but i dosent seem to work when i do it. This script plays after a program that tells you what to do. expandcollapse popup; ---- Declare some variables ---- ; arrow scanner pixel location. dim $arrow_x = 450 dim $arrow_y = 916 ; retrieve the pixel color of set co-ordinates dim $arrow = PixelGetColor ($arrow_x, $arrow_y) ; loop program variable. dim $count = 1 ; wait for your turn to bet variable. dim $play ; stop program for set time variable. dim $delay ; Group 1 dim $Group1 ; function to end/close program (esc) HotKeySet("{ESC}", "Terminate") ; start main program loop while $count < 8 ; pauses program for half a second. sleep(500) ; moves the mouse curser to the set co-ordinates MouseMove(800, 600, 2) $play = PixelGetColor (226, 455) ; if $play brings back 7877128 then it is our turn to bet ; if the fold button is visable, then procede with script if $play = 0 Then ; pauses the program for a random length of time (0.5 to 1 second) $delay = random(500,1000) sleep($delay) ; reset arrow scanner co-ordinates to default $arrow_x = 450 $arrow_y = 916 $arrow = PixelGetColor ($arrow_x, $arrow_y) ; while arrow is gray (15526360) + 1 to $arrow_x and get the pixel color. ; this loop will continue to do so until $arrow = 0 or the color black. (it finds the arrow) while $arrow = 15526360 $arrow_x = $arrow_x + 1 $arrow = PixelGetColor ($arrow_x, $arrow_y) WEnd ; once the arrow has been located (from the change in pixel colour), we then determin its location ; from the x axis ($arrow_x) and perform a set action. ; AFTER FLOP ;tells you that its after flop if PixelGetColor (137, 789) = 16777215 Then ; if $arrow_x is between 450 & 561 (Check or Fold column) then... if $arrow_x > 450 Then if $arrow_x <= 561 Then if $arrow = 0 Then ; clicks fold MouseClick("left", 239, 453, 3, 2) ; clicks check in the "are you sure you want to fold" box / used in the big blind position MouseClick("left", 679, 564, 3, 2) EndIf EndIf EndIf Endif ;tells you after flop if PixelGetColor (137, 789) = 16777215 Then ; if $arrow_x is between 562 & 615 (Check or Call one small bet column) then... if $arrow_x > 561 Then if $arrow_x <= 615 Then if $arrow = 0 Then MouseClick("left", 239, 453, 3, 2) MouseClick("left", 679, 564, 3, 2) EndIf EndIf EndIf Endif ;tells you after flop if PixelGetColor (137, 789) = 16777215 Then ; if $arrow_x is between 616 & 671 (Bet or Call one small bet column) then... if $arrow_x > 615 Then if $arrow_x <= 671 Then if $arrow = 0 Then ; clicks check or call. MouseClick("left", 382, 455, 3, 0) ; clicks call call when the button appears on the right MouseClick("left", 529, 452, 3, 0) EndIf EndIf EndIf Endif ;tells you after flop if PixelGetColor (137, 789) = 16777215 Then ; if $arrow_x is between 672 & 762 (Raise or Call one Raise column) then... if $arrow_x > 671 Then if $arrow_x <= 726 Then if $arrow = 0 Then if random() < 0.20 Then ; performed 20% of the time ; clicks raise MouseClick("left", 529, 452, 3, 2) Else ; Drags the Raise Bar about 1/10 of its length MouseClickDrag ("left", 600, 473, 636, 470, 20) MouseClick("left", 529, 452, 3, 2) EndIf EndIf EndIf EndIf Endif ;tells you after flop if PixelGetColor (137, 789) = 16777215 Then ; if $arrow_x is between 727 & 777 (Raise or Re-Raise) then... if $arrow_x > 726 Then if $arrow_x <= 777 Then if $arrow = 0 Then if random() < 0.75 Then ; Drags the Raise Bar about 1/10 of its length MouseClickDrag ("left", 600, 473, 636, 470, 20) MouseClick("left", 529, 452, 3, 2) else ; clicks raise MouseClick("left", 529, 452, 3, 2) EndIf EndIf EndIf EndIf Endif ;tells you after flop if PixelGetColor (137, 789) = 16777215 Then if $arrow_x = 779 Then $arrow_x = 778 $arrow_y = 914 $arrow = PixelGetColor ($arrow_x, $arrow_y) if $arrow = 0 Then ; This action is performed when we have the NUTS. 100% best hand MouseClickDrag("left", 600, 471, 748, 470, 20) MouseClick("left", 529, 452, 3, 2) EndIf EndIf Endif ; loops the program (you exit by pressing esc) If $count = $count + 1 Then if $count > 5 Then if $count < 8 Then $count = 1 EndIf EndIf EndIf Endif WEnd Func Terminate() Exit 0 EndFunc This is the script that i want to add. ; tells me its my turn if PixelGetColor (226, 455) = 0 Then ; tells me this is before flop if PixelGetColor (153, 809) = 4238414 Then ; tells me i got AA if PixelGetColor (1207, 87) And PixelGetColor (1205, 131) = 4238414 Then ; if call is between 1-7 then raise to 14 if PixelChecksum (594,594, 664,664) > 1 Then if PixelChecksum (594,594, 664,664) <= 7 Then MouseClickDrag("left", 656, 449, 595, 447, 20) send("1") send("4") MouseClick("left", 523, 454, 3, 2) EndIf EndIf EndIf EndIf EndIf The problem is that I want to add the second script to the first, so it should first check if through the first script if it match with the AA and if it dosent then it should check another script like that and so on and if it dosent match anyone then it should press: MouseClick("left", 239, 453, 3, 2) MouseClick("left", 679, 564, 3, 2) Thanks in advance Edited July 15, 2006 by Seedorf Link to comment Share on other sites More sharing options...
GaryFrost Posted July 15, 2006 Share Posted July 15, 2006 (edited) please post in support for help. Edit: thanks for moving to support Edited July 15, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
i542 Posted July 15, 2006 Share Posted July 15, 2006 (edited) Are you tried with #include command? #include <first.au3> i542 Edited July 15, 2006 by i542 I can do signature me. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now