Jump to content
Sign in to follow this  
donnyp02

Goto

Recommended Posts

donnyp02

I'm having an issue not having the goto function. I need to go from the middle of my script, back up to the upper part, then back down to the middle, etc... What can I use to do this as there is no goto?

Thanks for your help!

Share this post


Link to post
Share on other sites
SmOke_N

I'm having an issue not having the goto function. I need to go from the middle of my script, back up to the upper part, then back down to the middle, etc... What can I use to do this as there is no goto?

Thanks for your help!

Use functions.

If condition is true Then _myconditionfunc()


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Airwolf

I'm having an issue not having the goto function. I need to go from the middle of my script, back up to the upper part, then back down to the middle, etc... What can I use to do this as there is no goto?

Thanks for your help!

Create functions that perform the actions you'd like to repeat and call them when needed.

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt

Share this post


Link to post
Share on other sites
enaiman

This is a sensitive matter - it was discussed before and we have to accept that GoTo is gone for good.

Use function calls, returns, conditional statements ... that will help with a "healthy" script structure.

Other programming languages got rid of this instruction too (it looks like it makes debugging very painful).


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites
SmOke_N

Fast replys there... so the consensus would be?? :)


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
donnyp02

Thank you so very much for the quick response, I tried functions, and for some reasons my MouseClick's wont work inside of a function, any ideas?

Share this post


Link to post
Share on other sites
donnyp02

nm, I got it, thanks again everyone!

Share this post


Link to post
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
Sign in to follow this  

×