Sign in to follow this  
Followers 0
adz89

Return to a line in a script

4 posts in this topic

Hey guys,

Im in a bit of a predicament, I'm writing a script which kind of acts as a GUI for a internet based game, so the user doesn't need to access the website all the time, the program does it for them, but it requires a password and username.

I found that the best route to take is to ask the user for the username and password, then save them in an .ini file.

The only problem I've come across so far is the delete settings function I've found, (sometimes people start again with a new username and password), I want the script to delete the .ini file and run the set-up loop again, I don't want to go down the road of putting the setup loop in a function and calling that as this wouldn't completely solve the problem, I'd rather the script revert back to a line in the script, Is that possible?

Adam


Self confessed noob...

Share this post


Link to post
Share on other sites



There is no "goto" in AutoIt, you must figure out a way to use loops and/or functions to do whatever it is you want. Maybe if you post your script (or a reproducer if it's long) and explain more what your problem is someone can help you.

Share this post


Link to post
Share on other sites

Putting the Login logic in a function is the way to go. Why do you want to avoid that? "goto" even if possible is a bad programming practice for beginners and experts as well.

Share this post


Link to post
Share on other sites

Hi,

that is nearly the same. Instead of checking and then using goto, you do the check and then call the function. :)

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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  
Followers 0