Jump to content

Please Please Please Please Give me the GoTo command in AutoIT


 Share

Recommended Posts

I will sever my left arm off clean at the shoulder blade for the GoTo Command in Autoit.

What can I do, I know its not available.

I know I am a sloppy programmer, but Ive been battling for days to get the correct While and Loops and Nested if's going and its

driving me nuts when a simple GoTo command would solve all my problems.

I dont care if its sloppy.

Please tell me there is a version out there with the GoTo command added in, I read somewhere that the developer said if there

was enough call for it he would add it back in?

Is there a custom version out there somwhere with this command included?

Please please please

:P

Link to comment
Share on other sites

Thanks for the reply, but it doesnt help me.

My problem is that I have lots of Functions I have coded, and some of the functions are nested in other functions.

And at any point in time a user can leave or do something that must make the program go to the begining again.

I have a Return command, but that puts me back at the parent function.

I have an ExitLoop function, but again, that just end the current While statement.

What I really want is, if user exits, then GoTo, beginning of program again.

Its just really getting the better of me not having a simple GoTo command.

One thing I can think of is creating an entire copy of my code as a Function, then simply call the Function as a goto, but man Im not sure what would happen with the Global variable values, and memory leak and such.

I just wish a goto command was there :-(

Link to comment
Share on other sites

...I have an ExitLoop function, but again, that just end the current While statement...

ExitLoop [level]

Perhaps if you show us your code or a small example of how you coded your script - we might be able to suggest a better layout.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

  • Developers

I just wish a goto command was there :-(

Aint going to happen !

Just learn some programming basics and you won't miss it .. :P

Edited by JdeB

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

ExitLoop [level]

Perhaps if you show us your code or a small example of how you coded your script - we might be able to suggest a better layout.

Dude!!! Thanks

Yes, thats all I need, I never noticed the level option for the exit loop, that would help me enough to do what I want to do....I think.

Sorry cant show you the code :) top secret :P

But that should help me now, my code was getting stuck one level too low down, now that problem will go away

I should be able to actually finish my code now. Still would love the GoTo command though.

But its 5am now, been coding since 10am, think I need some sleep :D

Thanks again

Link to comment
Share on other sites

I was looking for the goto command myself. After a few hours of playing with the Func command I was able to make it work. I can see why learing that was important, but I did finally figure out how to create a goto like command. It was prety simple and I could have shot myself for not figureing it out sooner. I tried to use a null variable but AutoIT did not like that.

Curtiss W.

CODE
; Adding a goto like fuction in AutoIT V3.

; All you need to do is add a variable early in you program. I am going to call

; mine goto1. (Then any where you really need to use a goto command you can just

; uase a If Then statement.

$goto1 = "1" ;Setting up the goto variable

If $goto1 = "1" Then label_name() ; Change label name to the name you are using.

Thanks for the reply, but it doesnt help me.

My problem is that I have lots of Functions I have coded, and some of the functions are nested in other functions.

And at any point in time a user can leave or do something that must make the program go to the begining again.

I have a Return command, but that puts me back at the parent function.

I have an ExitLoop function, but again, that just end the current While statement.

What I really want is, if user exits, then GoTo, beginning of program again.

Its just really getting the better of me not having a simple GoTo command.

One thing I can think of is creating an entire copy of my code as a Function, then simply call the Function as a goto, but man Im not sure what would happen with the Global variable values, and memory leak and such.

I just wish a goto command was there :-(

Link to comment
Share on other sites

:D:)

I will sever my left arm off clean at the shoulder blade for the GoTo Command in Autoit.

What can I do, I know its not available.

I know I am a sloppy programmer, but Ive been battling for days to get the correct While and Loops and Nested if's going and its

driving me nuts when a simple GoTo command would solve all my problems.

I dont care if its sloppy.

Please tell me there is a version out there with the GoTo command added in, I read somewhere that the developer said if there

was enough call for it he would add it back in?

Is there a custom version out there somwhere with this command included?

Please please please

:P

:):D

GoTo is a thing of the past in AutoIt (Last was in AutoIt2) and you wouldn't believe the fuss that was created when it disappeared. I was one of the guilty parties that created a fuss

Actually when you look at it there is no difference between

If <condition> Then GoTo<sub>

and

If <condition> then Function()

The difference is that instead of being called a sub it's called a function

Now it seems that languages that use GoTo and/or GoSub are a bit on the archic side.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

GoTo is a thing of the past in AutoIt (Last was in AutoIt2) and you wouldn't believe the fuss that was created when i disappeared. I was one of the guilty parties that created a fuss

Really? People missed you that much?

:P

Link to comment
Share on other sites

Really? People missed you that much?

:P

OK I'll edit that

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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