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

[Clip] Re: Store e-mail address indefinietly

Expand Messages
  • Larry Thomas
    Message 1 of 8 , Sep 29, 1999
    • 0 Attachment
    • Brett Taylor
      This doesn t work - what am I doing wrong... ^!Set XName=someone ^!Set XEmail=someone@me.com ^!Set XName=^?[Default Name=^%XName%] ^!Set XEmail=^?[Default
      Message 2 of 8 , Sep 29, 1999
      • 0 Attachment
        This doesn't work - what am I doing wrong...

        ^!Set XName=someone
        ^!Set XEmail=someone@...
         
        ^!Set XName=^?[Default Name=^%XName%]
        ^!Set XEmail=^?[Default Email Address=^%XEmail%]
         
        ^!SetIniFile ^$GetLibraryName$
        ^!SaveValue XName=^%XName%
        ^!SaveValue XEmail=^%XEmail%

        God Bless,
        -= Brett Taylor =-
         
        -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        http://surf.to/enkisoft/   mailto:weednix@...
        Request my:  vCard, GeekCode, Marital Status, anything!
        -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        ----- Original Message -----
        Sent: Thursday, September 30, 1999 3:36 PM
        Subject: [Clip] Re: Store e-mail address indefinietly


        Hi Brett,

        At 03:14 PM 9/30/1999 +1200, you wrote:
        >>>>
        Hi all, My HTML_Xtreme Clipbook is being updated... and I want to add the function to use a default e-mail address all the way through. I remember reading a bit in the help file about storing variables in the ini file or something... can someone give me a hand finding it? Or even the clipcode I need to save and retrieve the value... Also, how can I get the clipbook to ask for the email address the first time the clipbook is loaded?
        God Bless,
        -= Brett Taylor =- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

        Go to Help: Contents | Reference | Tools | Editor Clipbook | Clipbook Programing | Clip Language - Variables. You will find ^!SaveValue and ^!GetValue there about 75% of the way to the bottom of that page.

        To get the clipbook to ask for the address on loading (opening the clipbook) you name the clip to be run "OnOpen". That name can be used once in any library and when the library is opened, NoteTab will automatically execute it - sort of an autoexec.bat or a startup menu for NoteTab clipbooks. Put a wizard in that clip to get the information and that is it.

        Regards,


        Larry
        larryt@...
      • Larry Thomas
        Message 3 of 8 , Sep 29, 1999
        • 0 Attachment
        • Jody
          Hi Brett, The next two lines are not needed unless you need to see the addresses the first time they are run. However, you will be resetting it to whatever
          Message 4 of 8 , Sep 29, 1999
          • 0 Attachment
            Hi Brett,

            The next two lines are not needed unless you need to see the
            addresses the first time they are run. However, you will be
            resetting it to whatever you have below each time so there would
            be no need to save the data in an ini file if that is the case.

            ^!Set XName=someone
            ^!Set XEmail=someone@...

            ; Set your ini file first so GetValue will work in the dialog.

            ^!SetIniFile ^$GetLibraryName$

            ; String this so you can use braces so the GetValue will be seen,
            ; and also by stringing them they both will come up in the same
            ; dialog. When you use braces in separate commands they will
            ; come up in the dialog when the NoteTab gets to the line while
            ; running the Clip.

            ^!Set XName=^?{Default Name=^$GetValue(XName)$}; XEmail=^?{Default Email Address=^$GetValue(XEmail)$}

            ; This is where you will save the values the ini file overwriting
            ; any old ones that may exist. This is handy for when the user
            ; needs to change the eMail address.

            ^!SaveValue XName=^%XName%
            ^!SaveValue XEmail=^%XEmail%

            I did not test it, but it looks right. <g> You may consider
            putting your SetIniFile in an H=OnOpen (H=_OnOpen) Clip if you
            are going to have a number of these throughout your Library.
            Once the SetIniFile is set it stays set until the Library is
            closed or until you set another one.

            Please delete the parts of the post not needed when replying and
            turn off your html formatting so everybody can read your posts.
            tanX

            Happy Clip'n!
            Jody

            http://www.sureword.com/notetab

            The NoteTab Clip List...
            mailto:Ntb-Clips-Subscribe@...
            mailto:Ntb-Clips-UnSubscribe@...
          • Brett Taylor
            Here s the REVISED Clip... ^!SetIniFile ^$GetLibraryName$ ^!Set %XName%=^$GetValue(XName)$; %XEmail%=^$GetValue(XEmail)$ ^!Set %XName%=^?{Default
            Message 5 of 8 , Sep 29, 1999
            • 0 Attachment
              Here's the REVISED Clip...

              ^!SetIniFile ^$GetLibraryName$
              ^!Set %XName%=^$GetValue(XName)$; %XEmail%=^$GetValue(XEmail)$
              ^!Set %XName%=^?{Default Name=^%XName%}; %XEmail%=^?{Default Email
              Address=^%XEmail%}
              ^!SaveValue XName=^%XName%
              ^!SaveValue XEmail=^%XEmail%
              ^!SaveValue XMade="777"

              And here is the OnOpen Clip!

              ^!SetIniFile ^$GetLibraryName$
              ^!If ^$GetValue(XMade)$ = "777" END
              ^!Clip "Set E-Mail Address"

              This enables a user to come back and change the options. Works good.
              Thanks everyone for their help!

              Maybe I'll get around to releasing the new version soon... :)

              God Bless,
              -= Brett Taylor =-

              -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
              http://surf.to/enkisoft/ mailto:weednix@...
              Request my: vCard, GeekCode, Marital Status, anything!
              -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
            • Brett Taylor
              Oh, BTW, Here is a clip that uses the new technique. Nothing special, but a good look at what it can do...? ^!SetIniFile ^$GetLibraryName$ ^!Set
              Message 6 of 8 , Sep 29, 1999
              • 0 Attachment
                Oh, BTW, Here is a clip that uses the new technique. Nothing special, but a
                good look at what it can do...?

                ^!SetIniFile ^$GetLibraryName$
                ^!Set %XName%=^$GetValue(XName)$; %XEmail%=^$GetValue(XEmail)$
                <A HREF="mailto:^?{Enter Email Address=_^&|^%XEmail%}">^?{Text to Set as The
                Active Link=_^&|^%XName%}</A>

                God Bless,
                -= Brett Taylor =-

                -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
                http://surf.to/enkisoft/ mailto:weednix@...
                Request my: vCard, GeekCode, Marital Status, anything!
                -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
              • Jody
                Hi Brett, ... Your Clip looks a lot better. There is no reason for setting the value like you are doing though. Just use the GetValue in the second set line
                Message 7 of 8 , Sep 29, 1999
                • 0 Attachment
                  Hi Brett,

                  >^!Set %XName%=^$GetValue(XName)$; %XEmail%=^$GetValue(XEmail)$
                  >^!Set %XName%=^?{Default Name=^%XName%}; %XEmail%=^?{Default Email
                  >Address=^%XEmail%}

                  Your Clip looks a lot better. There is no reason for setting the
                  value like you are doing though. Just use the GetValue in the
                  second set line like so and you can delete the first:

                  ^!Set %XName%=^?{Default Name=^$GetValue(XName)$}; %XEmail%=^?{Default Email
                  Address=^$GetValue(XEmail)$}

                  The first time through nothing will be there, because the value has
                  never been saved, but after that it will be.

                  Happy Clip'n!
                  Jody

                  http://www.sureword.com/notetab

                  The NoteTab Clip List...
                  mailto:Ntb-Clips-Subscribe@...
                  mailto:Ntb-Clips-UnSubscribe@...
                • Jody
                  Hi Brettv ... This is so perhaps you can understand it better Brett. The SetIniFile is not needed since you always set it OnOpen.
                  Message 8 of 8 , Sep 29, 1999
                  • 0 Attachment
                    Hi Brettv

                    >^!Set %XName%=^$GetValue(XName)$; %XEmail%=^$GetValue(XEmail)$
                    ><A HREF="mailto:^?{Enter Email Address=_^&|^%XEmail%}">^?{Text to Set as The
                    >Active Link=_^&|^%XName%}</A>

                    This is so perhaps you can understand it better Brett. The
                    SetIniFile is not needed since you always set it OnOpen.

                    <A HREF="mailto:^?{Enter Email Address=_^&|^$GetValue(XName)$}">^?{Text to Set as The Active Link=_^&|^$GetValue(XEmail)$}</A>

                    Do you see how it is used now? Once the value is saved in the
                    ini file you never have to set it again - just use the
                    ^$GetValue(...)$ function wherever you need it as long as the
                    ini file is set (in your case it was done when the Library was
                    opened).

                    GetValue tells NoteTab to go to whatever ini file is set and
                    return the value that is in it. You can also set sections and
                    keys as well.

                    ^!SaveValue [Section:]Key=Value

                    ^!SaveValue MySection:ThisKey=MyValue

                    ^$GetValue(MySection:ThisKey)$ returns MyValue

                    The ini file will look like:

                    [MySection]
                    ThisKey="MyValue"

                    If you had:

                    ^!SaveValue eMail:XName=John Doe
                    ^!SaveValue eMail:XEmail=johndoe@...

                    And you ini file would look like:

                    [eMail]
                    eMail="XName"
                    eMail="XEmail"

                    Your GetValues would be:

                    ^$GetValue(eMail:XName)$
                    ^$GetValue(eMail:XEmail)$

                    And would return:

                    John Doe
                    johndoe@...

                    ^$GetValue(eMail:XName)$...

                    ...says to look in the section of the ini file called "eMail" It
                    says to look for the "Key" called "XName" in that section and
                    return the value in it. (You can have as many - sections / keys
                    / values - as you want up to 32kb for the whole ini file).

                    nite.

                    Happy Clip'n!
                    Jody

                    http://www.sureword.com/notetab

                    The NoteTab Clip List...
                    mailto:Ntb-Clips-Subscribe@...
                    mailto:Ntb-Clips-UnSubscribe@...
                  Your message has been successfully submitted and would be delivered to recipients shortly.