blizzedout Posted August 26, 2005 Share Posted August 26, 2005 Is it possible for the script to build a .ini file if it cant find one? Link to comment Share on other sites More sharing options...
flyingboz Posted August 26, 2005 Share Posted August 26, 2005 Is it possible for the script to build a .ini file if it cant find one?<{POST_SNAPBACK}>uh.... FileOpen()... FileInstall()...just to mention two possibilities.if Not FileExists $ini_file then FileInstall($default_ini_file)if not fileExists $ini_file then $fh = FileOpen($ini_file,$write) FileWriteLine($fh,"[header]") FileWriteLine($fh,"param=value") .......Anything is possible if one reads the manual and codes accordingly. Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. Link to comment Share on other sites More sharing options...
blizzedout Posted August 26, 2005 Author Share Posted August 26, 2005 uh.... FileOpen()... FileInstall()...just to mention two possibilities.if Not FileExists $ini_file then FileInstall($default_ini_file)if not fileExists $ini_file then $fh = FileOpen($ini_file,$write) FileWriteLine($fh,"[header]") FileWriteLine($fh,"param=value") .......Anything is possible if one reads the manual and codes accordingly.<{POST_SNAPBACK}>thanks Link to comment Share on other sites More sharing options...
DeadMeat Posted August 26, 2005 Share Posted August 26, 2005 You might also want to look at the following commands which all have to do with creating/manipulating ini files. IniDelete IniRead IniReadSection IniReadSectionNames IniWrite Link to comment Share on other sites More sharing options...
Gigglestick Posted August 26, 2005 Share Posted August 26, 2005 uh.... FileOpen()... FileInstall()...Like doing things the hard way, do we, flyingboz? Just kidding. My UDFs: ExitCodes Link to comment Share on other sites More sharing options...
flyingboz Posted August 27, 2005 Share Posted August 27, 2005 Like doing things the hard way, do we, flyingboz? ..I fail to see what is difficult about writing out a line of text, or fileinstalling a preconfigured default ini file. Some of us had to write our UDFs from scratch before the language got to have as many functions incorporated as .NET , and bloated to a 136k compile Here I am really kidding - I'd put up w/ 500k for what COM and DllCall have given us. All hail those who made that happen!Seriously, for the new programmer, doing these things step by step are the best way to learn - then they'll understand what has to happen when they move to another (necessarily) less capable language. <duck and cover> Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. 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