Jump to content

saving and loading info to a script


Recommended Posts

how would i go about being able to save a config that will load when a script starts, and can be edited in a GUI, and then saved again once the script is closed?

there are alot of ways to do that, you can do it with plain files, using fileopen(), ini files with iniread/iniwrite, or registry keys using regread/regwrite
Link to comment
Share on other sites

Simple example using the INI-functions :

; Get information
$lastStarted = INIRead(@ScriptDir & "\config.ini", "settings", "laststarted", "First time")

; Show/use information
MsgBox(64, "Last started", $lastStarted) 

; Update information
INIWrite(@ScriptDir & "\config.ini", "settings", "lastStarted", @HOUR & ":" & @MIN & ":" & @SEC)
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...