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

Re: How to control switching documents

Expand Messages
  • ebbtidalflats
    ... single document while it is running. It seems to me, that what you need is to initialize the clip to the target document each time you start the clip, then
    Message 1 of 6 , Nov 21, 2008
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "John Shotsky" <jshotsky@...> wrote:
      >
      > I'm trying to figure out how to keep a clip library focused on a
      single document while it is running.


      It seems to me, that what you need is to initialize the clip to the
      target document each time you start the clip, then before you write
      anything to the document, have the clip check if the correct document
      is active, looping until the correct doc is active.

      Something like:

      ^!Set %target%=^$GetDocIndex$
      .
      .
      .
      ;ready to write, loop testing doc index until matched
      ^!If ^%target%<>^$GetDocIndex$ SKIP_-1

      You might want to add a message (instead of the silent loop):


      ;ready to write, loop testing doc index until matched
      ^!If ^%target%=^$GetDocIndex$ SKIP_2
      ^!StatusShow "Ready to write"
      ^!Goto SKIP_-2
      ^!StatusClose


      Cheers,


      Eb
    Your message has been successfully submitted and would be delivered to recipients shortly.