seppeke999 Posted June 16, 2012 Posted June 16, 2012 heya guys! so i want to make a script with 3 different functions "function 1" "function 2" "function 3" i would like it like this: function 1 repeats itself the whole time (also between function 2 and 3) but function 2 repeats itself every 15 secs and function 3 repeats itself every 50 minutes anyone who can help me on this one...? kind regards !
Moderators Melba23 Posted June 16, 2012 Moderators Posted June 16, 2012 seppeke999,Welcome to the AutoIt forum. Run your first function within an infinite loop (While...WEnd) and use AdlibRegister to fire the other 2 at the appropriate intervals. Take in look at the Help file to see how these functions work. 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
seppeke999 Posted June 16, 2012 Author Posted June 16, 2012 expandcollapse popupWhile 1 fight WEnd AdlibRegister ( "shortbuff", 15000 ) AdlibRegister ( "longbuff", 3000000 ) AdlibRegister ( "money", 120000 ) Func fight send ( "T" ) sleep ( 50 ) Send ( "Z" ) Sleep ( 2500 ) Send ( "Z" ) sleep ( 50 ) Send ( "Z" ) sleep ( 50 ) Send ( "Z" ) sleep ( 50 ) Send ( "Z" ) sleep ( 50 ) Send ( "Z" ) sleep ( 50 ) send ( "R" ) Sleep ( 50 ) send ( "E" ) EndFunc Func shortbuff Send ( "Q" ) sleep ( 50 ) Send ( "F" ) sleep ( 50 ) Send ( "W" ) EndFunc Func longbuff Send ( "S" ) sleep ( 50 ) Send ( "A" ) sleep ( 50 ) Send ( "D" ) sleep ( 3500 ) Send ( "X" ) sleep ( 3500 ) EndFunc Func money MouseClick ( "left" , 1465, 348, 1, 1) sleep ( 50 ) MouseClick ( "left" , 1465, 348, 1, 1) EndFunc does anyone see what i do wrong ?
Exit Posted June 16, 2012 Posted June 16, 2012 (edited) use brackets after the function names. Put adlibs before the while loop. Edited June 16, 2012 by forumer100 App: Au3toCmd UDF: _SingleScript()
seppeke999 Posted June 16, 2012 Author Posted June 16, 2012 use brackets after the function names.Put adlibs before the while loop.still says badly formatted "Func" statement ...
seppeke999 Posted June 16, 2012 Author Posted June 16, 2012 okay so now i got this it says badly formatted func statement line 8 when executing... anyone knows what to do ? expandcollapse popupAdlibRegister ( "shortbuff", 15000 ) AdlibRegister ( "longbuff", 3000000 ) AdlibRegister ( "money", 120000 ) While 1 fight WEnd Func ( fight ) send ( "T" ) sleep ( 50 ) Send ( "Z" ) Sleep ( 2500 ) Send ( "Z" ) sleep ( 50 ) Send ( "Z" ) sleep ( 50 ) Send ( "Z" ) sleep ( 50 ) Send ( "Z" ) sleep ( 50 ) Send ( "Z" ) sleep ( 50 ) send ( "R" ) Sleep ( 50 ) send ( "E" ) EndFunc Func ( shortbuff ) Send ( "Q" ) sleep ( 50 ) Send ( "F" ) sleep ( 50 ) Send ( "W" ) EndFunc Func ( longbuff ) Send ( "S" ) sleep ( 50 ) Send ( "A" ) sleep ( 50 ) Send ( "D" ) sleep ( 3500 ) Send ( "X" ) sleep ( 3500 ) EndFunc Func ( money ) MouseClick ( "left" , 1465, 348, 1, 1) sleep ( 50 ) MouseClick ( "left" , 1465, 348, 1, 1) EndFunc
JohnOne Posted June 16, 2012 Posted June 16, 2012 Func fight();stuffEndFunc AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Moderators Melba23 Posted June 16, 2012 Moderators Posted June 16, 2012 (edited) seppeke999,If you post code which is obviously for a game then expect the same treatment as if you explicitly state it. Thread locked. Please read the Forum Rules before posting again. M23 Edited June 16, 2012 by Melba23 Typo 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
Recommended Posts