Jump to content

v3 start: / Goto, start commands?


Recommended Posts

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

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

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 :D

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 :D 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, mylabel

A simple v3 version of that is a While loop that is always "true".

While 1 = 1

...do something...

...do something else...

Wend

If 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.

Link to comment
Share on other sites

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

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

  • Developers

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...