snowbrdr020 Posted January 13, 2007 Share Posted January 13, 2007 I have forum searched, as well as topic searched within the editor and i am unable to find the answer. i have a simple script i am working with right now that i made for the legacy version i was using before. it was a simple looping script that, when completed, looped back to "start:" and repeated itself until i killed the script manually. However, from what i can see, these commands are no longer used. what are the correct commands now? thanks. Link to comment Share on other sites More sharing options...
James Posted January 13, 2007 Share Posted January 13, 2007 While1 Sleep(100) msg() Wend Func msg() msgbox(0, "hey", "hey") End Func There ya go. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Zedna Posted January 13, 2007 Share Posted January 13, 2007 While1 Sleep(100) msg() Wend Func msg() msgbox(0, "hey", "hey") End Func oÝ÷ Ù8^ìêº^N«{¬+,x,¥§u¡WµjwZÊç©Æ޶׫jקvå¢`zw«jYrjwDÑnÆ®¶sevÆR¢×6r¢6ÆVW¥vVæ@ ¤gVæ2×6r¢×6v&÷ÂgV÷C¶WgV÷C²ÂgV÷C¶WgV÷C²¤VæDgVæ0 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
James Posted January 13, 2007 Share Posted January 13, 2007 Thats a good point, thanks Zedna. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
snowbrdr020 Posted January 13, 2007 Author Share Posted January 13, 2007 i saw that loop while looking through the help file, but honestly i have no idea what it means. what exactly goes in the "msg" area? start: script text script text script text script text script text ect.... Goto, start how does this simple script ending and then returning to start: convert into the loop format that you gave me as an example? once i see the connection and understand how to use it.. no worries, but yeah i dont see that yet. thanks. Link to comment Share on other sites More sharing options...
James Posted January 13, 2007 Share Posted January 13, 2007 Look in the help file of V3 to find what has changed and all the old commands. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Zedna Posted January 13, 2007 Share Posted January 13, 2007 how does this simple script ending and then returning to start: convert into the loop format that you gave me as an example? once i see the connection and understand how to use it.. no worries, but yeah i dont see that yet. thanks.Look at Helpfile as Secure_ICT said:There is section Frequently Asked Questions (FAQ)4. Where is the "goto" command?Gone. It's evil. No, you can't ask why - it just is. It's like that lump of rock they find in the microwave at the end of the film Time Bandits AutoIt v3 features most of the common "loops" in use today and with these Goto is no longer required. Look up While, Do, For, ExitLoop, ContinueLoop and Functions for the modern way of doing things And while you are looking at help file sections check out these on loops, conditional statements and functions. I promise you, once you have got the hang of such things you will be able to script in virtually any other language within a couple of minutes.Just to get you started, the most basic use of Goto in version 2.64 was an infinite loop like::mylabel...do something......and something else...goto, mylabelA simple v3 version of that is a While loop that is always "true".While 1 = 1 ...do something... ...do something else...WendIf there is a massive outcry about this after the launch of v3 then I may add it back in, but only to help people convert scripts. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
snowbrdr020 Posted January 13, 2007 Author Share Posted January 13, 2007 again, great help thanks. i got the script to loop how i want it showing me the While 1 = 1 ...do something... ...do something else... Wend helped alot. what exactly does the While 1 = 1 mean in "english" i guess a def of exactly what its saying. What happens if you alter the numbers? thanks. Link to comment Share on other sites More sharing options...
James Posted January 13, 2007 Share Posted January 13, 2007 You dont need the = 1 bit. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
BALA Posted January 13, 2007 Share Posted January 13, 2007 I think by saying "While 1" you're telling the program "While TRUE" and by saying "While 0" you're telling the program "While FALSE" [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
Developers Jos Posted January 13, 2007 Developers Share Posted January 13, 2007 I think by saying "While 1" you're telling the program "While TRUE" and by saying "While 0" you're telling the program "While FALSE"Ever tried a While 0 loop ? 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
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now