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

Re: [Clip] erratic results with: ^&

Expand Messages
  • Larry Thomas
    Hi Don, ... Try using ^$GetSelection$ instead of ^&. Regards, Larry larryt@commontech.net
    Message 1 of 2 , Jun 1, 2003
    • 0 Attachment
      Hi Don,

      At 04:20 PM 6/1/03 -0400, you wrote:
      >I am trying to set a variable equal to ^& so that I can paste it elsewhere
      >in my document. I am running 4.95 pro.
      >I would assume that the text on screen which is highlighted should be
      >captured if I use this:
      >^!Set %Header%=^P^P^&^P^P
      >
      >
      >It doesn't seem to be the case. Sometimes it is and sometimes it isn't! Am
      >I missing something? I am using
      >^!ClearVariables at the top of my clip. I want to copy and paste the
      >highlighted selection, is there an easier way? I don't see a ^!Copy
      >command. I suppose I could resort to ^!Keyboard CTRL + C although I think
      >keyboard is frowned upon by most clippers unless absolutely required.
      >
      >The first time I ran the clip, it worked like a charm. The second and
      >subsequent it captured something else even though the same string was
      >highlighted in both cases.

      Try using ^$GetSelection$ instead of ^&.

      Regards,

      Larry
      larryt@...
    • Larry Thomas
      Don, ... I am sorry about my short answer but now I have thought of more info. You should know that the ^& function works at the beginning of the execution of
      Message 2 of 2 , Jun 1, 2003
      • 0 Attachment
        Don,

        At 04:20 PM 6/1/03 -0400, you wrote:
        >I am trying to set a variable equal to ^& so that I can paste it elsewhere
        >in my document. I am running 4.95 pro.
        >I would assume that the text on screen which is highlighted should be
        >captured if I use this:
        >^!Set %Header%=^P^P^&^P^P
        >
        >
        >It doesn't seem to be the case. Sometimes it is and sometimes it isn't! Am
        >I missing something? I am using
        >^!ClearVariables at the top of my clip. I want to copy and paste the
        >highlighted selection, is there an easier way? I don't see a ^!Copy
        >command. I suppose I could resort to ^!Keyboard CTRL + C although I think
        >keyboard is frowned upon by most clippers unless absolutely required.

        I am sorry about my short answer but now I have thought of more info. You
        should know that the ^& function works at the beginning of the execution of
        a clip. This means that the text must be selected before you run the clip.
        If the clip selectes the text after it starts running, the ^& function
        will return nothing. I think that Eric described it as a priority of the
        interpreter for NoteTab to process and retreive all of the ^&, ^**, and ^##
        function information before executing any lines of code in the clip and
        that is why you can't get anything if nothing is selected when you start.
        ^$GetSelection$ on the otherhand does not process until the code for it is
        executed in the clip. The same thing applies to wizards. Wizards using
        the ^?[] form, all pop up to be processed before a single line of code is
        executed. Wizards using the ^?{} form are only processed when the line of
        code where they are located is processed.

        For copying purposes in addition to variables, you can use the clipboard with:

        ^!Toolbar Copy
        ^!Toolbar Copy All
        ^!Paste
        ^!PasteSelect
        ^!Toolbar Paste
        ^!Toolbar Paste New
        ^!SetClipboard ^$GetSelection$

        And there are probably more combinations that I am not thinking right now.

        Regards,

        Larry
        larryt@...
      Your message has been successfully submitted and would be delivered to recipients shortly.