crest Posted March 21, 2007 Posted March 21, 2007 Hey 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 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 Thanks in advance
crest Posted March 21, 2007 Author Posted March 21, 2007 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 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
BigDod Posted March 22, 2007 Posted March 22, 2007 Lookup _FileCreate or IniWrite in the help file assuming it is AutoIt 3 you are using. 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
Recommended Posts