Loading ...
Sorry, an error occurred while loading the content.

11628Re: [Clip] Re: Saving last used values

Expand Messages
  • Jody
    Mar 1, 2004
      Hi jdfmike,

      >This is the solution! Thank you very much! [speaking to John Zeman]

      I didn't know exactly what you meant by "saving last used
      values." There's a few different "reuses" (methods) of values for
      a lack of better terms. You are basically just reusing a value
      already set in the Clipbook session if I understand what you are
      doing. It will not be saved/remembered if used in another

      If you use "^%p_YOUR-VARIABLE%" it can be used again in any
      Library that calls the variable so long as you are still in the
      same NoteTab session. That is, NoteTab has not been restarted. It
      is the special code "p_" without the quotes that tells NoteTab to
      remember it.

      I presented a method the other day that stores the value in an
      INI file and can be called from any Library even after your
      computer has been restarted. I wasn't very complete though. I did
      not mention/explain precisely how to call/see the stored value
      again. I'll shorten the Clip to show what it does.

      This line makes the "NtbUsers" INI file active. It creates the
      INI file if it does not exist (I think -haha). It is where your
      values are stored just like a settings in a regular INI file like

      ^!SetIniFile NtbUsers

      There are a few things going on here. You are settings the
      value/contents of the variable %WinZip%. (In the Clip it is the
      location of WinZip's executable file FWIW.) The "(T=O)" makes the
      browse button with the three dots on it to browse to the file so
      that no path has to be typed in. ^$GetValue is the function used
      to get the value that was stored by the command ^!SaveValue in a
      previous use of the Clip - it is/was remembered. The section and
      key are the terms used in the function to name the parts of it.
      "Section" is optional denoted by the [brackets]
      ^$GetValue("[Section:]Key")$. I used both the section and a key
      in the section. You name them what you want. Generally this setting
      will stay the same, but don't think about that. :)

      ^!Set %WinZip%=^?{(T=O)Full path of WinZip=^$GetValue("WinZip:WinZip")$}
      ^!Set %SaveZip%=^?{(T=D)Enter default path to save zip files=^$GetValue("WinZip:SaveZip")$}

      This is what makes the entry in the INI file. NoteTab contents of
      the variable %WinZip% set above are used. ^!SaveValue has the
      section|key in it. WinZip is the section of the INI file that
      these two particular keys are stored in.

      ^!SaveValue WinZip:WinZip=^%WinZip%
      ^!SaveValue WinZip:SaveZip=^%SaveZip%

      This is what it looks link inside the INI file (NtbUsers). [WinZip]
      is the section, then there are two keys: WinZip and SaveZip with
      their contents.

      SaveZip="F:\NoteTab Pro\Libraries\"

      So, it is the ^!SaveValue that is used to set the values stored in the
      INI file and ^$GetValue that can be used at anytime form any Library.
      If no INI file is specified, then NoteTab's INI file is used to store
      the settings. You'll probably want to look back at the original post I
      made to see it all to maybe get a better understanding.

      If you open the SampleCode Library and look under "Wizard Fields"
      you'll see two Clips, one of which I mentioned above with the
      "p_" code in it. There is another called "Remember default value"
      that would fall under this discussion.

      Also, if you download my DirStuff Library there are two working
      examples of using the SaveValue and GetValue method. Near the
      bottom of the Library you'll see "Setup" and under it "Setup
      Directory" and "Setup WinZip." Two of the Clips that use the
      stored information are "Open Directory..." and "Checkbox
      Open...," but it is also used in other Libraries I have like
      FtpZip which has the same Setup WinZip (that only needs to be
      done from any of my Libraries that has it) and also "Setup
      NtbWsFtp" which is used for uploading files to web sites using


      No for the sales pitch. :-)

      My affiliate links and CD information.

      Download Trials and Freeware, Information...
      Really neat ordering system with discounts -
      Live PHP document showing instant cost/discounts
      Buy Now!, but check it out without buying!

      ** I can accept PayPal too! **
      (Write me: jody@...)

      CD-ROMs Loaded With MB and Are Very Useful

      Ordering Information: Price, CD build type...
      Programs, Utilities, Helps, Clip Tutorial...
      Third Party Products: Freeware and Shareware...
      Order Fookes Software through me (on/off CD)...


      I can only please one person a day.
      Today is obviously not your day.
      Tomorrow doesn't look good either. 8D
    • Show all 14 messages in this topic