adz89 Posted May 26, 2009 Share Posted May 26, 2009 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... Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 26, 2009 Share Posted May 26, 2009 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. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Juvigy Posted May 27, 2009 Share Posted May 27, 2009 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. Link to comment Share on other sites More sharing options...
Xenobiologist Posted May 27, 2009 Share Posted May 27, 2009 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 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