Sign in to follow this  
Followers 0
crest

Help @ Saving/Loading settings

3 posts in this topic

Hey :whistle:

ive got an autoit-script which is actually working as intended, but now i wanted to make it to be able to work with different resolutions and other settings.

I thought i could just make it like most modern games do it too:

When the scripts starts, a gui pops up where you can define the resolution and other options. Then those settings should be saved in a file (.txt?) and when the script is beeing started the next time, it simply reads those settings saved in the local file, so that you dont have do define those settings every time you run the script. The gui shouldnt pop up this time tho :D

Unfortunately i have no idea how im supposed to do that.

Hopefully someone can help me with that issue or redirect me to some tutorials or similar stuff, so that i can learn it :P

Thanks in advance

Share this post


Link to post
Share on other sites



well ... ive read a bit through the autoit-helpfile and now i think ive found a way how to do it (im not sure tho, whether its the best way do to it - so please feel free to post any superior ways xD)

First, the script should check whether a specific file already exists in the same directory as the script itself (which would be the "settings-file")

If it does exist, it should open it and read the already stored settings into some variables and the actually execute the rest of the script.

If it does not exist, the gui should pop up and after defining the settings, it should create a new file (maybe named myscriptsettings.txt) write the earlier defined settings into the file, then save it and execute the rest of the script.

This should work i guess :P

But i dont know how to create a new txt.file (or any other file). All i found was FileSaveDialog, but that doesnt help me at all, since this only works for already opened files :whistle:

Share this post


Link to post
Share on other sites

Lookup _FileCreate or IniWrite in the help file assuming it is AutoIt 3 you are using.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0