Anomouz Posted January 11, 2016 Share Posted January 11, 2016 (edited) Hi i'm very new to autoit and have been having a blast, I am stuck and was hoping to maybe get a little nudge in the right direction here.I am trying to write script that will basically Execute predefined mouse functions and then run butterflies() until the While loop returns -1 at which point it will return to something much like _rCG1(). Could someone please help me a litle with the highlighted lines, any help much appreciated. Thanks!While 1Sleep(1000)WEndFunc _rCG1() MouseClick($MOUSE_CLICK_LEFT,1580,146,1,10) Sleep (2000) MouseClick($MOUSE_CLICK_LEFT,1580,146,1,10) Sleep (1500) MouseClick($MOUSE_CLICK_LEFT,1580,146,1,10)EndFuncCall()? until butterflies() = -1 Then?Call Func _rCG2()?#Region ;; butterflies()Func butterflies()While 1..................... Else If $e[0] = -1 And $e[1] = -1 Then Return -1 EndIf EndIfWEndEndFunc......... Edited January 11, 2016 by Anomouz Link to comment Share on other sites More sharing options...
InunoTaishou Posted January 11, 2016 Share Posted January 11, 2016 While (kill() <> -1) Call() WEndIf I'm understanding what you want correctly. You could also use a Do...Until loopDo Call() Until (kill() = -1) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 11, 2016 Moderators Share Posted January 11, 2016 Anomouz,Welcome to the AutoIt forum.Func kill()With a function name like that in your script, please read the Forum rules - particularly the bit about not discussing game automation - before you post again.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...
Anomouz Posted January 11, 2016 Author Share Posted January 11, 2016 (edited) @Inuno Thank you worked perfectly@ M23 Yes sir, post edited to remove all doubts of my pure intentions (: Edited January 11, 2016 by Anomouz Link to comment Share on other sites More sharing options...
Developers Jos Posted January 11, 2016 Developers Share Posted January 11, 2016 @ M23 Yes sir, post edited to remove all doubts of my pure intentions (:Don't try to be a smart ass. *click* 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. Link to comment Share on other sites More sharing options...
Recommended Posts