Jump to content

Recommended Posts

Posted (edited)

hi,

when i open an ini by "fileopen", do i have to take care of closing it before the "exit" command ?

or does "exit" close all open files automatically ?

what happens on @error? is the file released ?

the question is because in my program there are several exit events.

i want to keep the file open until exit in order to prevent other programs from starting.

thanx

j.

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Posted

hi,

when i open an ini by "filopen", do i have to take care of closing it before the "exit" command ?

or does "exit" close all open files automatically ?

what happens on @error? is the file released ?

the question is because in my program there are several exit events.

thanx

j.

why would you open an ini with fileopen? why not use the ini functions?

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted

Fileclose is automatically done on exit, but you should still do it to make sure. INIRead and INIWrite do not require to use FileOpen else it will probably fail to read/write to the ini file.

Posted (edited)

because its a binary file, not an "ordinary" ini. there are no sections, keys and values.

i have to read out the complete string and transform it. on ending of program complete string is exchanged by new data.

j.

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Posted

so sorry, maybe its not an ini.file, but its just called "ini". i didnt write that file, so its not my fault. i just alter it.

i have oftenly come across "ini" files which contain not only text but pure hex data in one single line.

so your right, i shouldnt have called it "ini", but okay, its name is "ini" anyway.

thanx anyway, my question is answered. "exit" performs "fileclose" to all opened files.

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Posted

OK

The helpfile does recommend closing closing open files as a good idea before exit. The final choice is yours.

Remarks

Upon termination, AutoIt automatically closes any files it opened, but calling FileClose is still a good idea.

:whistle:

Posted

OK

The helpfile does recommend closing closing open files as a good idea before exit. The final choice is yours.

:whistle:

yep okay, but i dont have to take care of that in case of abnormal program termination ("sideway exits"). good news.

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

  • Moderators
Posted

so sorry, maybe its not an ini.file, but its just called "ini". i didnt write that file, so its not my fault. i just alter it.

i have oftenly come across "ini" files which contain not only text but pure hex data in one single line.

so your right, i shouldnt have called it "ini", but okay, its name is "ini" anyway.

thanx anyway, my question is answered. "exit" performs "fileclose" to all opened files.

j.

Are you sure the ".ini" file isn't just a renamed extension? Are you also sure that it's not encrypted?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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
×
×
  • Create New...