Jump to content

does "exit" perform "fileclose"


jennico
 Share

Recommended Posts

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

 

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

We should all do it to enforce good habits. One day you might find yourself using a language witch is not so fault tolerant.

Happy coding :whistle:

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...