AzGuL^ Posted March 7, 2006 Share Posted March 7, 2006 HotKeySet("{END}", "End") HotKeySet("{DEL}", "Go") While 1 Sleep(1) WEnd Func End() Exit EndFunc Func Go() MouseClick("left", 493, 462, 1, 2) Send("1") Send("{ENTER}") EndFunc I don't understand the command reference part about loops :-/ What do I need to add to make it loop till I press END? Link to comment Share on other sites More sharing options...
Developers Jos Posted March 7, 2006 Developers Share Posted March 7, 2006 HotKeySet("{END}", "End") HotKeySet("{DEL}", "Go") While 1 Sleep(1) WEnd Func End() Exit EndFunc Func Go() MouseClick("left", 493, 462, 1, 2) Send("1") Send("{ENTER}") EndFunc I don't understand the command reference part about loops :-/ What do I need to add to make it loop till I press END? Do you think anything is missing in the posted script ? did you try it ? 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...
AzGuL^ Posted March 7, 2006 Author Share Posted March 7, 2006 The thing missing is the loop, because I didn't understand this;http://www.autoitscript.com/autoit3/docs/i.../lang_loops.htm Link to comment Share on other sites More sharing options...
BigDod Posted March 7, 2006 Share Posted March 7, 2006 The thing missing is the loop, because I didn't understand this; http://www.autoitscript.com/autoit3/docs/i.../lang_loops.htmThis is the loop While 1 Sleep(1) WEnd It will keep your script active so the every time you press DEL it will perform the function GO. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Developers Jos Posted March 7, 2006 Developers Share Posted March 7, 2006 The thing missing is the loop, because I didn't understand this; http://www.autoitscript.com/autoit3/docs/i.../lang_loops.htmmmmh... what do you think this portion does: While 1 Sleep(1) 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. Link to comment Share on other sites More sharing options...
cppman Posted March 7, 2006 Share Posted March 7, 2006 (edited) The thing missing is the loop, because I didn't understand this;http://www.autoitscript.com/autoit3/docs/i.../lang_loops.htmTheWhile 1sleep(1)WEndis the loop... It will keep the script going forever....wooops, Every else beat me. lol, i type too slow Edited March 7, 2006 by CHRIS95219 Miva OS Project Link to comment Share on other sites More sharing options...
AzGuL^ Posted March 7, 2006 Author Share Posted March 7, 2006 (edited) But I need it be be like this; I press DEL It loops the script till I press END EDIT; So what do I change? EDIT2; It needs to loop the GO function. Edited March 7, 2006 by AzGuL^ Link to comment Share on other sites More sharing options...
BigDod Posted March 7, 2006 Share Posted March 7, 2006 Here is one way HotKeySet("{END}", "End") HotKeySet("{DEL}", "Go") While 1 Sleep(1) WEnd Func End() Exit EndFunc Func Go() While 1 MouseClick("left", 493, 462, 1, 2) Send("1") Send("{ENTER}") Sleep(1) WEnd EndFunc Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
xuzo Posted November 28, 2018 Share Posted November 28, 2018 The tutorial on the For loop is not very clear...and it's decrementing loops by default also, makes it confusing for beginners that know nothing about coding: I recreated the loop example so I can understand it in the future, hope it can help other rookies! #include <MsgBoxConstants.au3> For $i = 1 To 3 Step +1 ; MsgBox($MB_SYSTEMMODAL, "", "This will repeat the loop" & @CRLF & $i) MsgBox($MB_SYSTEMMODAL, "", "This will repeat the loop the ammount of times specified in the 'For' loop. Using [+] increments the loop. Using [-] decrements the loop." & @CRLF & @CRLF & "run #" & $i) Next MsgBox($MB_SYSTEMMODAL, "", "Run has exectuted all steps in the loop") Link to comment Share on other sites More sharing options...
Somerset Posted November 28, 2018 Share Posted November 28, 2018 Thread is 12 years old. Link to comment Share on other sites More sharing options...
xuzo Posted November 28, 2018 Share Posted November 28, 2018 1 minute ago, Somerset said: Thread is 12 years old. So...can't comment on old threads? If I'm breaking any forum rules, please let me know ? Link to comment Share on other sites More sharing options...
xuzo Posted November 28, 2018 Share Posted November 28, 2018 Thread might be 12 years old, but a Google search for "how to make loops auto it" shows that page in #1 position. Link to comment Share on other sites More sharing options...
Earthshine Posted November 28, 2018 Share Posted November 28, 2018 (edited) Just start a new thread. Yours is no better than what’s in the help file Edited November 28, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
xuzo Posted November 28, 2018 Share Posted November 28, 2018 So start a new thread and post it as an alternate example of for Loops? And it is better than the example, it explains what is going on as it executes. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 28, 2018 Moderators Share Posted November 28, 2018 Sigh. M23 Earthshine and FrancescoDiMuro 1 1 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