Results 1 to 9 of 9

Thread: Save and retrieve settings

  1. #1
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Save and retrieve settings

    How do I save settings from a form and load it onto the form for next time?
    Last edited by Mr. Doctor; 10-11-2012 at 08:38 PM.

  2. #2
    Join Date
    May 2009
    Location
    Denmark! YEAH I'M A VIKING!
    Posts
    344
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Like save an integer from a running script, close the script, and have the same integer working the next time you turn it on?

    I would use a website to store it.
    I ... Am ... CARTMANN!

  3. #3
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    saveinifile()
    loadinifile()

    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  4. #4
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    If you use a site, have a MySQL database in there and some PHP scripts to retrieve / save the values.
    There used to be something meaningful here.

  5. #5
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    SaveSetting
    LoadSetting

  6. #6
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, how do I use save setting and load setting?
    Last edited by Mr. Doctor; 02-05-2010 at 08:36 PM.

  7. #7
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    program New;
    begin
    SaveSetting('ScriptName', 'Setting to save', 'Value');
    writeln(LoadSetting('ScriptName', 'Setting to save'));
    end.

  8. #8
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks Myles

  9. #9
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I would use WriteINI and ReadINI though because Save/LoadSetting saves it in the registry or temp or something and it is not easily accessible (without using SCAR).

    WriteINI and ReadINI allow you to pass the name of the file to write/read to/from.

    The parameters are pretty much identical aside from the fact they require an extra Filename parameter.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •