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

Can I have a variable in a ^!Goto?

Expand Messages
  • Roy Herring
    I would like to have a variable in a ^!Goto so I can create a subroutine which can be called from various parts of a clip. Is there a way to simulate this?
    Message 1 of 2 , Mar 7, 2004
      I would like to have a variable in a ^!Goto so I can create a subroutine
      which can be called from various parts of a clip.
      Is there a way to simulate this?
      Sometimes I do a similar thing w/ ^!FarClip, but if one of the parms
      passed has a variable # of words, the parsing can become difficult.

      Here is a sample of how I would use it.

      ^!Set %Passed1%=Inbox - Outlook Express*
      ^!Set %Passed2%=passed2
      ^!Goto Focusapp
      :ReturnGoto
      ^!Set %Z%=^?{Returned=^%Returned%}
      ^!Goto End

      :Focusapp
      ; Input: ^%Passed1%
      ; Input: ^%Passed2%
      ; Input: ^%ReturnGoto%
      ; Output: ^%Returned%
      ^!Set %Counter%=0
      :Loop
      ; Only loop so many times
      ^!Inc %Counter%
      ^!If ^%Counter% >=3 End
      ^!Delay 10
      ^!Focusapp ^%Passed1%
      ^!IfError Loop
      ^!Set Returned=1
      ^!Goto ^%ReturnGoto%
      :End



      [Non-text portions of this message have been removed]
    • Roy Herring
      I m sorry for my previous question. I sent it before I realized that I had excluded the ^!Set %ReturnGoto%=ReturnGoto. I anyone would like a simple sample of
      Message 2 of 2 , Mar 7, 2004
        I'm sorry for my previous question. I sent it before I realized that I had
        excluded the ^!Set %ReturnGoto%=ReturnGoto.
        I anyone would like a simple sample of a subroutine, the one below works.
        As usual, you can do almost anything in this great product.

        Roy

        ^!Set %Passed%=passed
        ^!Set %ReturnGoto%=ReturnGoto
        ^!Goto Subroutine
        :ReturnGoto
        ^!Set %Z%=^?{Returned=^%Returned%}
        ^!Goto End

        :Subroutine
        ; Input: ^%Passed%
        ; Input: ^%ReturnGoto%
        ; Output: ^%Returned%
        ^!Set %Z%=^?{Passed=^%Passed%}
        ^!Set %Returned%=1
        ^!Goto ^%ReturnGoto%


        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.