Jump to content

Recommended Posts

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 post
Share on other sites

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 post
Share on other sites

Like doing things the hard way, do we, flyingboz? :whistle:

..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 :dance:

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 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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...