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

Saving last used values

Expand Messages
  • jdfmike
    I am trying to have a clip remember the last values used and re-display them the next time it is invoked. I want to save the settings across shutdowns. I wrote
    Message 1 of 14 , Feb 27 9:03 PM
    • 0 Attachment
      I am trying to have a clip remember the last values used and
      re-display them the next time it is invoked. I want to save the
      settings across shutdowns. I wrote the following clip to do that, it
      saves the updated poem number (as calculated) but does not save the
      last date selected.

      ^!SetIniFile "MomsPoems.ini"
      ^!Set %PoemNumber%=^$GetValue("PoemNumber")$
      ^!Inc %PoemNumber%
      ^!Set %PoemNumber%=^$StrAlign(^%PoemNumber%;4;Right)$
      ^!Set %PoemNumber%=^$StrReplace(" ";"0";^%PoemNumber%;True;False)$
      ^!Set %Day%=^$GetValue("Day")$
      ^!Set %Month%=^$GetValue("Month")$
      ^!Set %Year%=^$GetValue("Year")$
      ^!Set %Months%="January|February|March|April|May|..."
      ^!Set %Months%=^$SetDefaultValue(^%Months%;^%Month%)$
      ^?{PoemNumber=^%PoemNumber%} ^?{Title} ^?{Month=^%Months%}
      ^?{Day=^%Day%}, ^?{Year=^%Year%}



      E.M.
      ^!Set %FileName%="c:\...\Poem^%PoemNumber%.poe"
      ^!Set %FileDate%=^$GetFileDate(^%FileName%)$
      ^!If ^%FileDate% = 0 NewPoem ELSE OldPoem
      :NewPoem
      ^!Jump 3
      ^!Save AS ^%FileName%
      ^!SaveValue PoemNumber=^%PoemNumber%
      ^!SaveValue Month=^%Month%
      ^!SaveValue Day=^%Day%
      ^!SaveValue Year=^%Year%
      ^!Goto END
      :OldPoem
      ^!Prompt "Poem already exists!"
    • John Zeman
      Have you tried adding: ^!ProgIniSave [MomsPoems.ini] in the clip after writing the values? I know I ve had to do that when writing to the NoteTab ini file to
      Message 2 of 14 , Feb 28 6:42 AM
      • 0 Attachment
        Have you tried adding:

        ^!ProgIniSave [MomsPoems.ini]

        in the clip after writing the values? I know I've had to do that
        when writing to the NoteTab ini file to be assured of accurate (up to
        date) results. Likewise to get the accurate results from the ini
        file ^!ProgIniLoad must be run just before reading the values.

        John


        --- In ntb-clips@yahoogroups.com, "jdfmike" <yahoogroups@j...> wrote:
        > I am trying to have a clip remember the last values used and
        > re-display them the next time it is invoked. I want to save the
        > settings across shutdowns. I wrote the following clip to do that, it
        > saves the updated poem number (as calculated) but does not save the
        > last date selected.
        >
        > ^!SetIniFile "MomsPoems.ini"
        > ^!Set %PoemNumber%=^$GetValue("PoemNumber")$
        > ^!Inc %PoemNumber%
        > ^!Set %PoemNumber%=^$StrAlign(^%PoemNumber%;4;Right)$
        > ^!Set %PoemNumber%=^$StrReplace(" ";"0";^%PoemNumber%;True;False)$
        > ^!Set %Day%=^$GetValue("Day")$
        > ^!Set %Month%=^$GetValue("Month")$
        > ^!Set %Year%=^$GetValue("Year")$
        > ^!Set %Months%="January|February|March|April|May|..."
        > ^!Set %Months%=^$SetDefaultValue(^%Months%;^%Month%)$
        > ^?{PoemNumber=^%PoemNumber%} ^?{Title} ^?{Month=^%Months%}
        > ^?{Day=^%Day%}, ^?{Year=^%Year%}
        >
        >
        >
        > E.M.
        > ^!Set %FileName%="c:\...\Poem^%PoemNumber%.poe"
        > ^!Set %FileDate%=^$GetFileDate(^%FileName%)$
        > ^!If ^%FileDate% = 0 NewPoem ELSE OldPoem
        > :NewPoem
        > ^!Jump 3
        > ^!Save AS ^%FileName%
        > ^!SaveValue PoemNumber=^%PoemNumber%
        > ^!SaveValue Month=^%Month%
        > ^!SaveValue Day=^%Day%
        > ^!SaveValue Year=^%Year%
        > ^!Goto END
        > :OldPoem
        > ^!Prompt "Poem already exists!"
      • John Zeman
        ... A slight correction, the brackets [] should not surround the ini file name in (I just copied and pasted the help file text and forgot to delete the
        Message 3 of 14 , Feb 28 6:56 AM
        • 0 Attachment
          --- In ntb-clips@yahoogroups.com, "John Zeman" <john041650@y...>
          wrote:
          > Have you tried adding:
          >
          > ^!ProgIniSave [MomsPoems.ini]
          >
          >


          A slight correction, the brackets [] should not surround the ini file
          name in (I just copied and pasted the help file text and forgot to
          delete the brackets)

          ^!ProgIniSave [MomsPoems.ini]

          should be:

          ^!ProgIniSave MomsPoems.ini


          John
        • jdfmike
          Thanks for the suggestion John, unfortunately it didn t solve the problem. The poem number does get updated, the date fields do not. I suspect it s a timing
          Message 4 of 14 , Feb 28 9:48 AM
          • 0 Attachment
            Thanks for the suggestion John, unfortunately it didn't solve the
            problem. The poem number does get updated, the date fields do not. I
            suspect it's a timing issue (the save is being done before the input
            window is closed) but this is more conjecture than anything else.

            Note: If I enter a new poem number it is not saved, the value
            calculated by the clip is the value that is saved.

            --- In ntb-clips@yahoogroups.com, "John Zeman" <john041650@y...>
            wrote:
            > --- In ntb-clips@yahoogroups.com, "John Zeman" <john041650@y...>
            > wrote:
            > > Have you tried adding:
            > >
            > > ^!ProgIniSave [MomsPoems.ini]
            > >
            > >
            >
            >
            > A slight correction, the brackets [] should not surround the ini
            file
            > name in (I just copied and pasted the help file text and forgot to
            > delete the brackets)
            >
            > ^!ProgIniSave [MomsPoems.ini]
            >
            > should be:
            >
            > ^!ProgIniSave MomsPoems.ini
            >
            >
            > John
          • John Zeman
            I only vaguely follow your strategy here but it appears to me that your ^%Month% ^%Day% and ^%Year% variables never get updated. For example: ^!Set
            Message 5 of 14 , Feb 28 10:50 AM
            • 0 Attachment
              I only vaguely follow your strategy here but it appears to me that
              your ^%Month% ^%Day% and ^%Year% variables never get updated. For
              example:

              ^!Set %Day%=^$GetValue("Day")$
              Sets the variable %Day% to the value in the ini file.

              But nowhere else in your clip do I see where you alter the value of %
              Day% to something else before you write it back to the ini file.
              Same for the ^%Month% and ^%Year% variables.

              John



              --- In ntb-clips@yahoogroups.com, "jdfmike" <yahoogroups@j...> wrote:
              > Thanks for the suggestion John, unfortunately it didn't solve the
              > problem. The poem number does get updated, the date fields do not. I
              > suspect it's a timing issue (the save is being done before the input
              > window is closed) but this is more conjecture than anything else.
              >
              > Note: If I enter a new poem number it is not saved, the value
              > calculated by the clip is the value that is saved.
              >
            • jdfmike
              John: The fields are displayed for modification via the input form in the statement: ^?{PoemNumber=^%PoemNumber%} ^?{Title} ^?{Month=^%Months%} ^?{Day=^%Day%},
              Message 6 of 14 , Feb 28 5:34 PM
              • 0 Attachment
                John:

                The fields are displayed for modification via the input form in the
                statement:

                ^?{PoemNumber=^%PoemNumber%} ^?{Title} ^?{Month=^%Months%}
                ^?{Day=^%Day%}, ^?{Year=^%Year%}

                The new values are used in the document but not saved to the ini file.

                I do appreciate your taking the time to help me. I've trying to enter
                my mom's poetry into the computer and have over 2200 poems to do so
                having this clip working could save me some time.

                --- In ntb-clips@yahoogroups.com, "John Zeman" <john041650@y...> wrote:
                > I only vaguely follow your strategy here but it appears to me that
                > your ^%Month% ^%Day% and ^%Year% variables never get updated. For
                > example:
                >
                > ^!Set %Day%=^$GetValue("Day")$
                > Sets the variable %Day% to the value in the ini file.
                >
                > But nowhere else in your clip do I see where you alter the value of %
                > Day% to something else before you write it back to the ini file.
                > Same for the ^%Month% and ^%Year% variables.
                >
                > John
                >
                >
                >
                > --- In ntb-clips@yahoogroups.com, "jdfmike" <yahoogroups@j...> wrote:
                > > Thanks for the suggestion John, unfortunately it didn't solve the
                > > problem. The poem number does get updated, the date fields do not. I
                > > suspect it's a timing issue (the save is being done before the input
                > > window is closed) but this is more conjecture than anything else.
                > >
                > > Note: If I enter a new poem number it is not saved, the value
                > > calculated by the clip is the value that is saved.
                > >
              • John Zeman
                ... file. ... ^?{PoemNumber=^%PoemNumber%} ^?{Title} ^?{Month=^%Months%} ^?{Day=^%Day%}, ^?{Year=^%Year%} That s what s throwing me here.. The above lines are
                Message 7 of 14 , Feb 28 7:54 PM
                • 0 Attachment
                  --- In ntb-clips@yahoogroups.com, "jdfmike" <yahoogroups@j...> wrote:
                  > John:
                  >
                  > The fields are displayed for modification via the input form in the
                  > statement:
                  >
                  > ^?{PoemNumber=^%PoemNumber%} ^?{Title} ^?{Month=^%Months%}
                  > ^?{Day=^%Day%}, ^?{Year=^%Year%}
                  >
                  > The new values are used in the document but not saved to the ini
                  file.
                  >



                  ^?{PoemNumber=^%PoemNumber%} ^?{Title} ^?{Month=^%Months%}
                  ^?{Day=^%Day%}, ^?{Year=^%Year%}

                  That's what's throwing me here..

                  The above lines are dynamic but don't "do" anything. What am I
                  missing?

                  John
                • jdfmike
                  Isn t this command responsible for displaying the form from which I enter the poem number, title and date? See the following screen shot:
                  Message 8 of 14 , Feb 28 10:43 PM
                  • 0 Attachment
                    Isn't this command responsible for displaying the form from which I
                    enter the poem number, title and date? See the following screen shot:

                    <img src="http://members.shaw.ca/mmotek/PoemForm.jpg">

                    --- In ntb-clips@yahoogroups.com, "John Zeman" <john041650@y...>
                    wrote:
                    > --- In ntb-clips@yahoogroups.com, "jdfmike" <yahoogroups@j...>
                    wrote:
                    > > John:
                    > >
                    > > The fields are displayed for modification via the input form in
                    the
                    > > statement:
                    > >
                    > > ^?{PoemNumber=^%PoemNumber%} ^?{Title} ^?{Month=^%Months%}
                    > > ^?{Day=^%Day%}, ^?{Year=^%Year%}
                    > >
                    > > The new values are used in the document but not saved to the ini
                    > file.
                    > >
                    >
                    >
                    >
                    > ^?{PoemNumber=^%PoemNumber%} ^?{Title} ^?{Month=^%Months%}
                    > ^?{Day=^%Day%}, ^?{Year=^%Year%}
                    >
                    > That's what's throwing me here..
                    >
                    > The above lines are dynamic but don't "do" anything. What am I
                    > missing?
                    >
                    > John
                  • Jody
                    Hi jdfmike, ... I ve only glanced at what was posted, but perhaps the following example is what you are looking for. I split up the initial ^!Set line into
                    Message 9 of 14 , Feb 29 4:16 AM
                    • 0 Attachment
                      Hi jdfmike,

                      >Thanks for the suggestion...

                      I've only glanced at what was posted, but perhaps the following
                      example is what you are looking for. I split up the initial ^!Set
                      line into many to try to keep the long line from messing things
                      up. This is a simple method I use via the Clipbar to zip up the
                      focused file although it is made to do more. Maybe it is what you
                      are looking for. The first Clip (Setup WinZip) is where the default
                      values are set and are remembered between NoteTab seesions.)

                      <--- Copy below this line --->
                      H=Setup WinZip
                      ; eMailed on 02-29-2004, Jody, www.notetab.net
                      ; http://www.notetab.net/html/cd-info.htm
                      ^!SetIniFile NtbUsers

                      ; all lines start with ^!Set till blank line. The values set are
                      ; paths obtained from the wizards. It makes the defaults for
                      ; WinZip, one place I keep/save zip files, files that I normally
                      ; zip up such as Libraries, looks like a redundant path to open
                      ; zips, default path to extract them to, and lastly an option to
                      ; open the ini file.

                      ^!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")$}
                      ^!Set %Files2Zip%=^?{(T=D)Enter default path of files to zip=^$GetValue("WinZip:Files2Zip")$}
                      ^!Set %OpenZip%=^?{(T=D)Enter default path to open zip files=^$GetValue("WinZip:OpenZip")$}
                      ^!Set %ExtractZip%=^?{(T=D)Enter default path to extract zip files=^$GetValue("WinZip:ExtractZip")$}
                      ^!Set %Openini%=^?{Do you want to open the new or updated .ini file?==Yes^=1|_No^=}

                      ^!SaveValue WinZip:WinZip=^%WinZip%
                      ^!SaveValue WinZip:SaveZip=^%SaveZip%
                      ^!SaveValue WinZip:Files2Zip=^%Files2Zip%
                      ^!SaveValue WinZip:OpenZip=^%OpenZip%
                      ^!SaveValue WinZip:ExtractZip=^%ExtractZip%

                      ^!IfTrue ^%Openini% Next Else End
                      ^!Delay 3
                      ^!Open ^$GetLibraryPath$NtbUsers.ini
                      ^!Jump Doc_End
                      ^!Find "[WinZip]" SB

                      ; (IniFile NtbUsers - file made from Clip above)
                      ; [WinZip]
                      ; WinZip=G:\WinZip\WINZIP32.EXE
                      ; SaveZip="F:\NoteTab Pro\Libraries\"
                      ; Files2Zip="F:\NoteTab Pro\Libraries\"
                      ; OpenZip="F:\NoteTab Pro\Libraries\"
                      ; ExtractZip="F:\NoteTab Pro\Test\"

                      H=QuickZip...
                      ^!SetIniFile NtbUsers
                      ; long line to compress focused file in NoteTab.
                      ^!^$GetValue("WinZip:WinZip")$ -min -a -en "^?{(T=S)Full path and filename of zip file=^$GetValue("WinZip:SaveZip")$^$StrLower("^$GetName(^##)$.zip")$}" "^?{(T=O;S=M)File(s) to compress, wildcards are OK=^##}"

                      <--- Copy above this line --->
                      <--- Right click over a Library --->
                      <--- Choose: Add from Clipboard --->



                      Happy Clip'n!
                      Jody

                      www.clean-funnies.com, http://www.fookes.us/maillist.htm

                      Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
                      UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
                      Options: http://groups.yahoo.com/group/ntb-clips
                    • John Zeman
                      This has been a tough nut to crack Jody but I think I m getting close. jdfmike try changing the questionable line below in your clip from this:
                      Message 10 of 14 , Feb 29 6:02 AM
                      • 0 Attachment
                        This has been a tough nut to crack Jody but I think I'm getting close.

                        jdfmike try changing the questionable line below in your clip from
                        this:


                        ^?{PoemNumber=^%PoemNumber%} ^?{Title} ^?{Month=^%Months%} ^?{Day=^%
                        Day%}, ^?{Year=^%Year%}


                        to two these two command lines (watch out for line breaks):

                        ^!Set %POEMNUMBER%=^?{PoemNumber=^%PoemNumber%}; %TITLE%=^?{Title}; %
                        MONTH%=^?{Month=^%Months%}; %DAY%=^?{Day=^%Day%}; %YEAR%=^?{Year=^%
                        Year%}

                        ^!InsertText Poem#: ^%POEMNUMBER%, Title: ^%TITLE%, Month: ^%MONTH%,
                        Day: ^%DAY%, Year: ^%YEAR%

                        ;========================================

                        The problem with the original clip is no matter what you entered for
                        values in your pop up box, they meant nothing other than to write it
                        to the document (the poem that you have open). It always created a
                        new poem file even if you entered an existing poem number. By using
                        the pop up box values entered to update your other variables, the
                        clip should now add both the same text to the open poem, plus write
                        those values (including the date) to the ini file so they will be the
                        defaults the next time you run the clip.

                        John
                      • jdfmike
                        This is the solution! Thank you very much!
                        Message 11 of 14 , Feb 29 8:21 AM
                        • 0 Attachment
                          This is the solution! Thank you very much!

                          --- In ntb-clips@yahoogroups.com, "John Zeman" <john041650@y...> wrote:
                          > This has been a tough nut to crack Jody but I think I'm getting close.
                          >
                          > jdfmike try changing the questionable line below in your clip from
                          > this:
                          >
                          >
                          > ^?{PoemNumber=^%PoemNumber%} ^?{Title} ^?{Month=^%Months%} ^?{Day=^%
                          > Day%}, ^?{Year=^%Year%}
                          >
                          >
                          > to two these two command lines (watch out for line breaks):
                          >
                          > ^!Set %POEMNUMBER%=^?{PoemNumber=^%PoemNumber%}; %TITLE%=^?{Title}; %
                          > MONTH%=^?{Month=^%Months%}; %DAY%=^?{Day=^%Day%}; %YEAR%=^?{Year=^%
                          > Year%}
                          >
                          > ^!InsertText Poem#: ^%POEMNUMBER%, Title: ^%TITLE%, Month: ^%MONTH%,
                          > Day: ^%DAY%, Year: ^%YEAR%
                          >
                          > ;========================================
                          >
                          > The problem with the original clip is no matter what you entered for
                          > values in your pop up box, they meant nothing other than to write it
                          > to the document (the poem that you have open). It always created a
                          > new poem file even if you entered an existing poem number. By using
                          > the pop up box values entered to update your other variables, the
                          > clip should now add both the same text to the open poem, plus write
                          > those values (including the date) to the ini file so they will be the
                          > defaults the next time you run the clip.
                          >
                          > John
                        • Jody
                          Hi jdfmike, ... 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
                          Message 12 of 14 , Mar 1, 2004
                          • 0 Attachment
                            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
                            Library.

                            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
                            NotePro.ini.

                            ^!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.

                            [WinZip]
                            WinZip="G:\WinZip\WINZIP32.EXE"
                            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
                            Ws_Ftp.

                            http://www.notetab.net/html/library.htm
                            http://www.notetab.net/zip/dirstuff.zip
                            http://www.notetab.net/zip/ftpzip.zip

                            No for the sales pitch. :-)

                            My affiliate links and CD information.

                            Download Trials and Freeware, Information...
                            ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
                            http://www.fookes.com/regnow.html?2448&item=home
                            Really neat ordering system with discounts -
                            Live PHP document showing instant cost/discounts
                            Buy Now!, but check it out without buying!
                            http://www.fookes.com/regnow.html?2448

                            ** I can accept PayPal too! **
                            http://www.fookes.us/paypal.htm
                            (Write me: jody@...)

                            CD-ROMs Loaded With MB and Are Very Useful

                            Ordering Information: Price, CD build type...
                            http://www.notetab.net/html/cd-info.htm
                            Programs, Utilities, Helps, Clip Tutorial...
                            http://www.notetab.net/html/onthiscd.htm
                            Third Party Products: Freeware and Shareware...
                            http://www.notetab.net/html/tpp-readthis.htm
                            Order Fookes Software through me (on/off CD)...
                            http://www.fookes.com/regnow.html?2448

                            bcnu,
                            jody

                            I can only please one person a day.
                            Today is obviously not your day.
                            Tomorrow doesn't look good either. 8D
                            http://www.clean-funnies.com
                            http://www.notetab.net
                          • Larry Thomas
                            Hi Jody and others, ... I have discovered a situation where you must use something other than a variable to pass your data. There was a question sometime back
                            Message 13 of 14 , Mar 1, 2004
                            • 0 Attachment
                              Hi Jody and others,

                              At 12:06 PM 3/1/04 -0600, you wrote:
                              >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
                              >Library.
                              >
                              >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 have discovered a situation where you must use something other than a
                              variable to pass your data. There was a question sometime back from Manuel
                              asking about why he could not set a variable in one clip and use it in a
                              second one. That is, he was having a problem. He would run clip one and
                              it would set a variable and then he would run clip two which would use the
                              variable and it did not work. I told him about the ^%p_Global Variables%
                              that you mentioned above. Then I came accross a situation on one of my own
                              clips where the second clip could not get the contents of the variable.

                              It appears that it fails if you run the clips from a clipbar. If you run
                              them from the clipbook itself, then they work fine but if you run them from
                              the clipbar the variable does not get passed. My understanding of the
                              clipbar is that clips are loaded into RAM before being run. When this
                              happens, it appears that the second clip deletes/clears the variables from
                              RAM when it is loaded and run and the variable is lost. If you run the
                              clip from the clipbook panel or the In-Context box, the clip is read and
                              run from the library one instruction at a time and when you run the second
                              clip, the variable is still in RAM and available for the second clip to
                              use. I thought that you might be interested in this as it caught me off
                              guard when I was writting my clip. I may have even given Manuel bad advise
                              without realizing it. If so, I apologize.

                              Regards,

                              Larry
                              lrt@... e¿ê
                            • Jody
                              Hi Larry, ... Yes, there are a few things that do not work (not programmed to) from the Clipbar and have to be run from Library to Library. FarClip does not
                              Message 14 of 14 , Mar 2, 2004
                              • 0 Attachment
                                Hi Larry,

                                >It appears that it [^%p_variable%] fails if you run the clips
                                >from a clipbar. If you run them from the clipbook itself, then
                                >they work fine but if you run them from the clipbar the variable
                                >does not get passed.

                                Yes, there are a few things that do not work (not programmed to)
                                from the Clipbar and have to be run from Library to Library.
                                FarClip does not work from the if I am not mistaken; wouldn't be
                                the first time I am wrong though. <g>

                                Take care,
                                Jody Adair

                                The whole world doth err save you and me,
                                and even thou doest err some!
                                http://clean-funnies.com
                                http://notetab.net, http://fookes.us
                              Your message has been successfully submitted and would be delivered to recipients shortly.