Results 1 to 8 of 8

Thread: savesetting form question

  1. #1
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default savesetting form question

    just a quick question:

    i used secet's drayner cutter and banker as a guide for my form and i noticed that he used SaveSetting to save the settings in his form so you dont have to retype everything if you are testing/constantly using.

    well i tried to use it in mine but the settings wont save and i think its in the first part of the syntax. I dont know what to fill in there for it to save correctly.

    what do i need to put in the
    SaveSetting ('RIGHT HERE','TreeColor1',TreeEdit1.Text);

    thanks
    METAL HEAD FOR LIFE!!!

  2. #2
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program New;
    begin
    SaveSetting('myscript','mytext','Lolololollo hahahhhaha muhahahah loll hahah hehhehehe hahahahh lalallala hiiihhhh hehehhehehee!')
    Writeln(LoadSetting('myscript','mytext'))

    SaveSetting('section1','setting1','Lol!')
    SaveSetting('section1','setting2','Haha!')

    Writeln('setting 1: '+LoadSetting('section1','setting1'))
    Writeln('setting 2: '+LoadSetting('section1','setting2'))
    end.
    Look at this, if you want to load that text, you must add LoadSetting and for section put same as in savesetting and for setting put same as in save setting, then it loads the string from memory.

  3. #3
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    tits dude thanks!
    METAL HEAD FOR LIFE!!!

  4. #4
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey....
    Check this small scar file I attached, try to change the setting's value in it.
    When you run with it, it tells the value of the setting.

  5. #5
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    I usually use the first parameter for the name of my script, then the second for what it is and the third for its value. So for example :

    SaveSetting('VYC', 'AuthenticationUsername', eAuthUN.Text);
    Administrator's Warning:


  6. #6
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    lol kewl thanks

    BUT do i need to do the loadsetting thing in like my script setup or can i just have it after i hit the start button on my form?

    EDIT: looks like this only will write the settings in the debug box and i want it to write it in the form and have it stay in the form so i dont have to retype it all when im running tests on it. Is there a way to do this?
    METAL HEAD FOR LIFE!!!

  7. #7
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Just do something like this in your form: FormEdit1.Text:=LoadSetting('MyScript','FormEdit')
    And after the form has been closed, use save settings to save the info.

    (You normally read there something like FormEdit1.Text:='Bla bla text';
    But now when you load setting to it, it shows the setting what was last put there)

  8. #8
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    thanks works like a charm now...i feel dumb asking that question since it was sooo easy lol

    tyvm
    METAL HEAD FOR LIFE!!!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Tabbed Form Question
    By Aje in forum OSR Help
    Replies: 9
    Last Post: 05-27-2007, 11:58 PM
  2. Nub form question
    By $PYD3R in forum OSR Help
    Replies: 0
    Last Post: 04-01-2007, 04:50 AM

Posting Permissions

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