Jump to content

Whats better?


Recommended Posts

say i have a script where when u close it, it saves some stuff and when you reopen it reads the stuff so its there again .

as far as i know, you have 2 options .... Save the stuff to an INI file or to save it to the Registry and retrieve it

i was wondering what people think is "better" or more "benificial" ... saving to an INI or saving to the registry...

Edited by burrup

qq

Link to comment
Share on other sites

i prefer the registry because i don't like extra files

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

ty for your input :)

i am still undecided as what to use, my script will save to INI or Registry and when the computer boots up my script will retrieve the values from wherever they are and continoue to run.

edit: also with INI files, it depends on where u put your INI file, eg say u put it in the same folder as the script, in mycase the desktop, i am frequently deleting files from my desktop etc and would probably delete the ini file by accident, or if u put it in @TempDir some people empty that folder frequently as to remove "un-necessary" junk

i think having save it in the registry has a much less chance of getting deleted by accident

Edited by burrup

qq

Link to comment
Share on other sites

i was wondering what people think is "better" or more "benificial" ... saving to an INI or saving to the registry...

<{POST_SNAPBACK}>

I Generally go for the registry but when I go to a restricted network the administrator generally will not let you read/write anything to it. Since then, I prefer to use INI with my AutoIt scripts. They also consider the INI file more flexible and much more easy to change.
I am running a box with borg technology! The distintiveness of your brand box will be added to the colective ... protection utilities are futile!cha, cha, chachaaaanm!
Link to comment
Share on other sites

i was wondering what people think is "better" or more "benificial" ... saving to an INI or saving to the registry...

I tend to save the values in an INI file. I also include the default INI file in my script, in case the original gets deleted. If you test to see if the INI exists first, you can simply use a FileInstall() to drop a default INI file along with your script, like this:

If FileExists(@ScriptDir &"\myfile.INI") = 0 Then
  FileInstall("C:\PathTo\Original\myfile.INI",@ScriptDir&"\myfile.INI",1)
Endif

Who lied and told you life would EVER be fair?

Link to comment
Share on other sites

i ditto what CyberSlug said.. but a different reason, well, what he said, they "needlesy" write to the registry, and just what IF, something went all wrong and your registry was compltetley gone, eh?? i just feel safer writing to ini's, unless it is a nesescity to write to the registry.. :)

FootbaG
Link to comment
Share on other sites

burrup don't hate me...

don't worry about it. you came to your conclusion. both ini and registrycalls have thier own merits, and also issues. registry can hide data yet making it availible, and an ini can store values without making them prone to registry cleaners. i figure do it as how you need it.

Edited by beerman
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...