Guest agentyak Posted March 11, 2013 Share Posted March 11, 2013 Hello all, I need some help with a script I'm writing. I want to preface this by saying that I know my script is not as condensed as it could be, I pulled it all out for troubleshooting's sake. When I run the following script, then hit the button to run button1(), it clicks then types the username that I have in there, then clicks and types it again. After a bunch of loops of this (maybe 15-20?) it goes on to type the password, then goes back to looping the click and type username. I can't figure out why this script is doing this. Help? Thanks in advance! expandcollapse popup#include #include #include #include $Form1 = GUICreate( "AutoClicker" , 1000 , 100 , 192 , 124 ) $Button1 = GUICtrlCreateButton( " Start Repeating! " , 600 , 24 , 97 , 33 ) $Exit = GUICtrlCreateButton( " Exit ",700,24,97,33) $var1 = 2 HotKeySet("{ESC}","Pause") HotKeySet("{Enter}", "button1") GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = -3 Then Exit If $msg = $Exit Then Pause() Exit EndIf If $msg = $Button1 Then button1() WEnd func button1() MouseClick("left",879, 444,1,0) Send("username",1) Sleep(750) Send("{ENTER}") Sleep(750) Send("password",1) Sleep(750) Send("{ENTER}") Sleep(15000) MouseClick("left",957, 755,1,0) Sleep(5000) Send("{F9}") Sleep(10000) MouseClick("left",1258, 480,1,0) Sleep(3500) MouseClick("left",200, 173,1,0) Sleep(1000) MouseClick("left",186, 255,1,0) Sleep(1000) MouseClick("left",275, 407,1,0) Sleep(21600000) Mouseclick("left",1331, 314,1,0) Sleep(500) Send("{F1}") MouseClick("left",1362,346,1,0) Sleep(2500) Send("{F1}") MouseClick("left",1367, 333,1,0) button1() EndFunc Link to comment Share on other sites More sharing options...
nitekram Posted March 11, 2013 Share Posted March 11, 2013 If you look at the bottom of your function - you will see you call your function again - try and remove that line and see if it clears your issue. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
Guest agentyak Posted March 11, 2013 Share Posted March 11, 2013 (edited) If you look at the bottom of your function - you will see you call your function again - try and remove that line and see if it clears your issue.Hmm, with and without doing that it's now crashing returning "Exit code: -1073741819" when I try and run it. I don't see how that would fix it though, it's not getting to the end of the function.EDIT: I fixed that error, and did what you suggested with no luck Edited March 11, 2013 by agentyak Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 11, 2013 Moderators Share Posted March 11, 2013 agentyak,What exactly are you trying to do here? Labels like "AutoClicker" and "Start Repeating" do not give me a nice warm feeling. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Guest agentyak Posted March 11, 2013 Share Posted March 11, 2013 (edited) agentyak,What exactly are you trying to do here? Labels like "AutoClicker" and "Start Repeating" do not give me a nice warm feeling. M23I'm trying to log into a program, then get it set up to play then relog in 6 hours. It's not an actual autoclicker I did however use a slightly modified block of code similar to that when I was writing an autoclicker as a practice. I tend to just copy & paste that whenever I start a new script, because it's generally a similar gui setup that I need. Edited March 11, 2013 by agentyak Link to comment Share on other sites More sharing options...
nitekram Posted March 11, 2013 Share Posted March 11, 2013 (edited) edit - removed, as mod is going to close Edited March 11, 2013 by nitekram 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
Guest agentyak Posted March 11, 2013 Share Posted March 11, 2013 mod is going to closeWhy? Is this against "the rules"? Link to comment Share on other sites More sharing options...
nitekram Posted March 11, 2013 Share Posted March 11, 2013 (edited) Yes, the fact that you are trying to automate a game...RULES LINKDo not ask for help with AutoIt scripts, post links to, or start discussion topics on the following subjects:Malware of any form - trojan, virus, keylogger, spam tool, "joke/spoof" script, etc.Bypassing of security measures - log-in and security dialogs, CAPTCHAs, anti-bot agents, software activation, etc.Automation of software/sites contrary to their EULA (see Reporting bullet below).Launching, automation or script interaction with games or game servers, regardless of the game.Running or injecting any code (in any form) intended to alter the original functionality of another process.Decompilation of AutoIt scripts or details of decompiler software.This list is non-exhaustive - the Moderating team reserve the right to close any thread that they feel is contrary to the ethos of the forum Edited March 11, 2013 by nitekram 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
Guest agentyak Posted March 11, 2013 Share Posted March 11, 2013 It didn't seem very harmful to create a program to automate relogging after you play for 6 hours. I didn't think it was automatic as they referred to it, since it's not a bot to play the game for me. I'm sorry I bothered you guys, I'll go elsewhere. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 11, 2013 Moderators Share Posted March 11, 2013 agentyak,I'll go elsewhereA good idea as you will get no help here for that script - which part of "script interaction with games" do you feel it does not infringe? The Forum rules (there is also a link at bottom right of each page) are not just there for decoration - we do enforce them. Thread locked. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts