Bacost Posted February 14, 2016 Share Posted February 14, 2016 if GUICtrlRead($Colo) = "Black" then $Choose = 0x444444 $Cord1 = 1593 EndIf if GUICtrlRead($Colo) = "Red" then $Choose = 0xC9302C $Cord1 = 699 EndIf MouseClick("left",$Cord1,568,1,10) Here is the code, the thing is that if you choose red the $Cord1 should change to 1593, but it is giving me an error, IDK why. Thanks for reading. Link to comment Share on other sites More sharing options...
JohnOne Posted February 14, 2016 Share Posted February 14, 2016 what error? show whole working reproducer. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Bacost Posted February 14, 2016 Author Share Posted February 14, 2016 if GUICtrlRead($Colo) = "Black" then $Choose = 0x444444 $Cord1 = 1593 EndIf if GUICtrlRead($Colo) = "Red" then $Choose = 0xC9302C $Cord1 = 699 EndIf While 1 MouseClick("left",502,488,1,10) Send("{CTRLDOWN}") Send("a") Send("{CTRLUP}") Send("{DEL}") Sleep(1000) Send(GUICtrlRead($Amoun) & ' {ENTER}') Sleep(1000) MouseClick("left",$Cord1,568,1,10) Sleep(60000) color() and it says Variable used without being declared.: MouseClick("left",$Cord1,568,1,10) MouseClick("left",^ ERROR >Exit code: 1 Time: 12.13 Link to comment Share on other sites More sharing options...
JohnOne Posted February 14, 2016 Share Posted February 14, 2016 There is no gui control to read from. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
AutoBert Posted February 14, 2016 Share Posted February 14, 2016 (edited) the whole script is needed. In your snipet i can't see a Control $Colo nor the region where variables are created. So when GuiCtrlRead($colo) wether 'Black' nor 'Red' the variable $coor1 may be never declared. So back to beginning, read the help =>Language Reference (specialy - Variables). Edited February 14, 2016 by AutoBert Link to comment Share on other sites More sharing options...
Bacost Posted February 14, 2016 Author Share Posted February 14, 2016 expandcollapse popup#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 266, 139, -1, -1) GUISetBkColor(0x0066CC) $Start = GUICtrlCreateButton("Start", 8, 8, 75, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Info = GUICtrlCreateButton("How To?", 8, 56, 75, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Exit = GUICtrlCreateButton("Exit", 8, 104, 75, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Colo = GUICtrlCreateInput("Color", 112, 104, 145, 21) $Amoun = GUICtrlCreateInput("Amount", 112, 32, 145, 21) $Amount = GUICtrlCreateLabel("Amount to Bet", 120, 8, 99, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Color = GUICtrlCreateLabel("Black or Red", 120, 80, 105, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $Choose Global $Cord1 if GUICtrlRead($Colo) = "Black" then $Choose = 0x444444 $Cord1 = 1593 EndIf if GUICtrlRead($Colo) = "Red" then $Choose = 0xC9302C $Cord1 = 699 EndIf While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Start Betting() Case $Info EndSwitch WEnd HotKeySet("{ESC}","endProg") Func endProg() Exit EndFunc Func Betting() While 1 MouseClick("left",502,488,1,10) Send("{CTRLDOWN}") Send("a") Send("{CTRLUP}") Send("{DEL}") Sleep(1000) Send(GUICtrlRead($Amoun) & ' {ENTER}') Sleep(1000) MouseClick("left",$Cord1,568,1,10) Sleep(60000) color() WEnd EndFunc That is the full code is a work in progress btw Link to comment Share on other sites More sharing options...
JohnOne Posted February 14, 2016 Share Posted February 14, 2016 There is no such function as color() AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Bert Posted February 14, 2016 Share Posted February 14, 2016 Please review the forum rules concerning game automation seeing how this is a poker bot. Thread reported The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Bert Posted February 14, 2016 Share Posted February 14, 2016 1 hour ago, Bacost said: expandcollapse popup#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 266, 139, -1, -1) GUISetBkColor(0x0066CC) $Start = GUICtrlCreateButton("Start", 8, 8, 75, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Info = GUICtrlCreateButton("How To?", 8, 56, 75, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Exit = GUICtrlCreateButton("Exit", 8, 104, 75, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Colo = GUICtrlCreateInput("Color", 112, 104, 145, 21) $Amoun = GUICtrlCreateInput("Amount", 112, 32, 145, 21) $Amount = GUICtrlCreateLabel("Amount to Bet", 120, 8, 99, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Color = GUICtrlCreateLabel("Black or Red", 120, 80, 105, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $Choose Global $Cord1 if GUICtrlRead($Colo) = "Black" then $Choose = 0x444444 $Cord1 = 1593 EndIf if GUICtrlRead($Colo) = "Red" then $Choose = 0xC9302C $Cord1 = 699 EndIf While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Start Betting() Case $Info EndSwitch WEnd HotKeySet("{ESC}","endProg") Func endProg() Exit EndFunc Func Betting() While 1 MouseClick("left",502,488,1,10) Send("{CTRLDOWN}") Send("a") Send("{CTRLUP}") Send("{DEL}") Sleep(1000) Send(GUICtrlRead($Amoun) & ' {ENTER}') Sleep(1000) MouseClick("left",$Cord1,568,1,10) Sleep(60000) color() WEnd EndFunc That is the full code is a work in progress btw The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Recommended Posts