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

Re: [Clip] Choose two choices

Expand Messages
  • Sheri
    ... Use curly braces instead of square brackets in your wizards. Square bracket wizards get interpreted before any other clip commands whereas curly brace ones
    Message 1 of 9 , Mar 21, 2003
      At 11:47 AM 3/21/03 +0000, satriaf wrote:


      >the above code shows a listbox (Add Parameter?) and two textbox (Key
      >and Value) (these are vb terms, sorry i am a vb programmer). i want
      >only a listbox appear first. if user choose No then close the dialog
      >and write "Request.ClientCertificate", otherwise close the dialog and
      >appear a new dialog whose two textbox.
      >
      >How can i do this
      >
      >best regard
      >Satria F

      Use curly braces instead of square brackets in your wizards. Square bracket wizards get interpreted before any other clip commands whereas curly brace ones are interpreted inline. You will also want to assign the wizard result to variables so you can later refer to them, e.g.,

      ^!Set %var%="^?{wizard}"
      if ^%var% ..etc.

      Regards,
      Sheri
    • Sheri
      Oops, I had a typo, sorry ... ... above should use ^## not ^** Regards, Sheri
      Message 2 of 9 , Mar 21, 2003
        Oops, I had a typo, sorry ...


        >H="Open saved ver of doc"
        >^!^$GetAppFileName$ "^**" /INI=NT2 /R
        >;end of clip

        above should use "^##" not "^**"

        Regards,
        Sheri
      • hsavage
        ... Hi Satria, I don t know your objective but the clip below branches to either LABEL and gives a second dialog depending on Yes/No choice. hrs
        Message 3 of 9 , Mar 21, 2003
          satriaf wrote:

          >Hi list,
          >i am new to clip programming.
          >i have a snippet code like this.
          >
          >H="ClientCertificate() -> Variant"
          >;fill ParCer variable with one of this value : No or Yes
          >^!Set %ParCer%="^?[Add Parameter?==_No|Yes]"
          >;If user choose No and Click OK then close the dialog and jump to
          >LblNo
          >;but If user choose Yes and Click OK then close the dialog and
          >then ;jump to LblYes
          >^!If "^%ParCer%"="No" LblNo ELSE LblYes
          >:LblNo
          >;write the line below
          >Request.ClientCertificate
          >^&
          >:LblYes
          >;pops up a new dialog
          >^?[Key=] ^?[Value=]
          >^&
          >
          >the above code shows a listbox (Add Parameter?) and two textbox (Key
          >and Value) (these are vb terms, sorry i am a vb programmer). i want
          >only a listbox appear first. if user choose No then close the dialog
          >and write "Request.ClientCertificate", otherwise close the dialog and
          >appear a new dialog whose two textbox.
          >
          >How can i do this
          >
          >best regard
          >Satria F
          >
          >
          Hi Satria,

          I don't know your objective but the clip below branches to either LABEL
          and gives a second dialog depending on Yes/No choice.

          hrs

          H="ClientCertificate() -> Variant"
          ;fill ParCer variable with one of this value : No or Yes
          ^!Set %ParCer%=^?{Add Parameter?==_No^=LBLNO|Yes^=LBLYES}
          ;choose No and jump to LBLNO
          ;choose Yes and jump to LBLYES
          ^!Goto ^%ParCer%
          ;
          :LBLNO
          ;write the line below
          Request.ClientCertificate
          ^&
          :LBLYES
          ;pops up a new dialog
          ^?{Key=} ^?{Value=}
          ^&
        • Jody
          Hi satriaf, ... You are forgiven. :-) When using {braces} as Sheri mentioned they are evaluated during the line by line parsing. You will get more than one
          Message 4 of 9 , Mar 21, 2003
            Hi satriaf,

            > sorry i am a vb programmer)

            You are forgiven. :-)

            When using {braces} as Sheri mentioned they are evaluated during
            the line by line parsing. You will get more than one popup
            depending on when they are used. That is desired at times and
            not at other times, but for reason of using ^%variables% and
            ^$Functions$ in the wizard it has to be used with braces, not
            brackets. You might use the contents later in the Clip though.
            So, you string out your brace wizards on one line when you have
            to use them, but only want one popup. Use a semi-colon for the
            delimiter. For instance:

            ^!Set %GBlock%=^$GetBlock$
            ^!Set %v1%=^?{Blah=^$GetSelection$}; %v2%=^?{Blah, blah=^$GetWord$}; %v3%=^?{Blah, blah, blah=^%GBlock%}

            While we're at it:

            text
            ^?[Enter name]
            text
            text
            ^?[Enter name]
            text

            Only one wizard will popup, but the name entered will be inserted in both
            places. "Enter name" being exactly the same is what NoteTab sees in this
            case that causes it to act that way.

            Happy Clip'n!
            Jody

            http://www.notetab.net

            Subscribe, UnSubscribe, Options
            mailto:Ntb-Clips-Subscribe@yahoogroups.com
            mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
            http://groups.yahoo.com/group/ntb-clips
          • satriaf
            thanks all, it works now i just add command ^!Goto End after LBLNO label to the code like hsavage did. H= ClientCertificate() - Variant ;fill ParCer variable
            Message 5 of 9 , Mar 21, 2003
              thanks all, it works now

              i just add command ^!Goto End after LBLNO label to the code like
              hsavage did.

              H="ClientCertificate() -> Variant"
              ;fill ParCer variable with one of this value : No or Yes
              ^!Set %ParCer%=^?{Add Parameter?==_No^=LBLNO|Yes^=LBLYES}
              ;choose No and jump to LBLNO
              ;choose Yes and jump to LBLYES
              ^!Goto ^%ParCer%
              ;
              :LBLNO
              ;write the line below
              Request.ClientCertificate
              ^&
              ^!Goto End <-- just add this
              :LBLYES
              ;pops up a new dialog
              ^?{Key=} ^?{Value=}
              ^&
            Your message has been successfully submitted and would be delivered to recipients shortly.