Jump to content

Recommended Posts

Posted

The following is a script that is designed so that it can read a program called holdem inspecter and use that information to automatically punch the correct buttons on my party poker window. It should work, however, when i run it i get an error saying in line 41 saying "elseif $action=4 then

elseif^ERROR

ERROR: Variable used without being declared

unfortunately i cant find the flaw. It appears to be correct. her is the code.

Id be very thankful if any1 could figure this out.. Thanks :lmao:

i atached the script so if ur not busy download it and see what you can come up with.

poker_script.au3

Posted

It comes up ok here. It passes SyntaxCheck without issues. Everything looks in place. See if you can copy your posted code back into your editor the check it again.

  • Developers
Posted

there is a logic error... see this formatted version:

0015  +-While WinExists($tablename)
0016  | Sleep(300);
0017  | $FoldVisible = ControlCommand($tablename, "", $FoldButton, "IsVisible", "");
0018  | $RaiseVisible = ControlCommand($tablename, "", $RaiseButton, "IsVisible", "");
0019  |  +-If $FoldVisible = 1 Then
0020  |  |  Sleep(Random(1500, 2500))
0021  |  |  $action = GetAction();
0022  |  |  +-If $action = 1 Then
0023  |  |  |   ; Fold/Check
0024  |  |  |   ; if we can check for free, then do that instead of folding
0025  |  |  |  +-If StringInStr(ControlGetText($tablename, "", $CheckButton), "Check") = 1 Then
0026  |  |  |  |    ControlClick($tablename, "", $CheckButton);
0027  |  |  |  +-Else
0028  |  |  |  |    ControlClick($tablename, "", $FoldButton);
0029  |  |  |  +-EndIf
0030  |  |  +-ElseIf $action = 2 Then
0031  |  |  |   ; Check/Call
0032  |  |  |   ;Sleep(Random(0, 2000));
0033  |  |  |   ControlClick($tablename, "", $CallButton);
0034  |  |  +-ElseIf $action = 3 Then
0035  |  |  |   ; Call/Bet
0036  |  |  |   ; if we can call then call otherwise bet
0037  |  |  |   If StringInStr(ControlGetText($tablename, "", $CallButton), "Call") = 1 Then ControlClick($tablename, "", $CallButton);
0038  |  |  +-Else
0039  |  |  |   ControlClick($tablename, "", $BetButton);
0040  |  |  +-EndIf
0041  |  +-ElseIf $action = 4 Then
0042  |  |   ; Bet/Raise
0043  |  |   ;Sleep(Random(0, 2000));
0044  |  |  ControlClick($tablename, "", $RaiseButton);
0045  |  +-EndIf
0046  +-WEnd

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

Im not sure if this would work but, Do you think there is a way to have it act at differnent times. It would be very cool if i could get it to change up its timeing and emulate human characteristics even more. Lemme know what you guys think or even if its possible. Thanks again for the help. :lmao:

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...