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

Re: [Clip] WScript pop-up over executing clip

Expand Messages
  • Art Kocsis
    Hi Eb, There are two modes of spawning another process: synchronous and asynchronous. Synchronous is another way of saying sequential vs simultaneous for
    Message 1 of 9 , Jun 13, 2010
    • 0 Attachment
      Hi Eb,

      There are two modes of spawning another process: synchronous and asynchronous.
      Synchronous is another way of saying sequential vs simultaneous for
      asynchronous.
      You are invoking your WScript window in synchronous mode which requires it to
      complete before returning control back to the spawning process.

      Read the "Executing Programs" section of the Notetab clip help file. There
      are various
      to launch external apps synchronously or asynchronously. In particular
      check out
      ^!Shell CommandLine, ^!ShellWait CommandLine and ^!FocusApp AppTitle

      If you are trying to time a Notetab process/script you would get far more
      accurate
      results by timing script strictly within Notetab.

      If you only need 1 second accuracy you can use the clips below (assumes start
      and finish on the same day):

      ############## Start of clip code (long lines may be
      wrapped) #####################
      ;### Clip to record start time
      ^!Set %start%=^$GetDate(mm-dd-yyy hh:nn:ss)$
      ^!Set %finsh%=^%start%

      ;### Clip to record finish time & calc elapsed time
      ^!Set %finsh%=^$GetDate(mm-dd-yyy hh:nn:ss)$
      ^!Set %bgn%=^$StrCopyRight("^%start%";8)$
      ^!Set %end%=^$StrCopyRight("^%finsh%";8)$
      ^!Set %end%=^$Calc(3600*^$StrCopy("^%end%";1;2)$ +
      60*^$StrCopy("^%end%";4;2)$ + ^$StrCopy("^%end%";7;2)$)$
      ^!Set %bgn%=^$Calc(3600*^$StrCopy("^%bgn%";1;2)$ +
      60*^$StrCopy("^%bgn%";4;2)$ + ^$StrCopy("^%bgn%";7;2)$)$
      ^!Set %diff%=^$Calc(^%end%-^%bgn%)$
      ^!Continue Start: ^%start%^%nl%Finish: ^%finsh%^%nl%Elapsed: ^%diff% seconds
      ############## end of clip code #####################

      If you need fractional second accuracy, call an external app
      (sysnchronously) to set
      the clipboard with the time and save it upon return with the
      ^$GetClipboard$ command.

      HTH,

      Art


      At 06-13-10 11:36, you wrote:
      >Hi Y'all,
      >
      >I've got a weird problem. I want to run an external timer (Wscript) to
      >pop-up a window over the currently executing clip wizard.
      >
      >The problem is, the pop-up doesn't get focus when a clip is running.
      >There is be a way to force focus on an external window, BUT
      >
      >1. the window doesn't exist until the pop-up command
      >(Wscript.echo) or MsgBox(...) etc
      >
      >2. The pop-up must be cleared by the user, so there are no
      >other script commands possible until AFTER the pop-up
      >disappears.
      >
      >So either way I can't think of a way to force the pop-up into focus.
      >
      >Does anyone have any idea how to get around the clip wizard's focus?
      >
      >TIA
      >
      >Eb

      ----------


      No virus found in this outgoing message.
      Checked by AVG - www.avg.com
      Version: 9.0.819 / Virus Database: 271.1.1/2932 - Release Date: 06/11/10 11:35:00


      [Non-text portions of this message have been removed]
    • ebbtidalflats
      Hi Art, Thanks for the reply. ... No, I m trying to inform the user, that [s]he s spent too much time running the wizard, which the clip launched AFTER it
      Message 2 of 9 , Jun 13, 2010
      • 0 Attachment
        Hi Art,

        Thanks for the reply.

        --- In ntb-clips@yahoogroups.com, Art Kocsis <artkns@...> wrote:
        > ...
        > If you are trying to time a Notetab process/script

        No, I'm trying to inform the user, that [s]he's spent too much time running the wizard, which the clip launched AFTER it started the timer.


        > ...
        > results by timing script strictly within Notetab.

        NoteTab will run only 1 clip at a time. That's the wizard clip. Since it is still active, I cannot start another clip. This is also the reason NT's timer event will fail - another clip is already running.

        Anyway, I've succeeded to pop-up the msgbox over the wizard without focus. So now I'd like to find a way to GIVE it focus.


        Cheers


        Eb
      • Al
        ... What s wrong with a couple of ^!FocusApp wscript_my_app s_titlebar_name placed at strategic points inside the clip that s running (that you are timing with
        Message 3 of 9 , Jun 13, 2010
        • 0 Attachment
          ebbtidalflats wrote:
          > Hi Art,
          >
          > Thanks for the reply.
          >
          > --- In ntb-clips@yahoogroups.com, Art Kocsis <artkns@...> wrote:
          >
          >> ...
          >> If you are trying to time a Notetab process/script
          >>
          >
          > No, <snip>
          >
          > Anyway, I've succeeded to pop-up the msgbox over the wizard without focus. So now I'd like to find a way to GIVE it focus.
          >

          What's wrong with a couple of

          ^!FocusApp wscript_my_app's_titlebar_name

          placed at strategic points inside the clip that's running (that you are
          timing with the wscript)

          Probably there are too many clips

          Oops someone is filling in the wizard fields and the clip can't
          ^!FocusApp at the same time.

          Make an alternate ini so you can command line launch a 2nd Notetab that,
          upon launch, is running a timer clip -- call this command line from the
          first clip -- do so just before the wizard pops up

          in the 2nd (Notetab and) clip, in this clip have a repeat focusapp to
          keep it focused so that the wizard of 1st clip is not in focus and thus
          the person cannot fill in the wizard fields.

          Excuse me, I gotta run. I just saw a dog chasing its tail (or was that
          me chasing my tail?).

          Alan.



          [Non-text portions of this message have been removed]
        • ebbtidalflats
          Hi Al, Interesting idea -- using a clip from a second instance of NoteTab. I may give it a try, just for education. I don t see how this will overcome the
          Message 4 of 9 , Jun 14, 2010
          • 0 Attachment
            Hi Al,

            Interesting idea -- using a clip from a second instance of NoteTab.
            I may give it a try, just for education. I don't see how this will overcome the focus of the wizard.

            By the way, when running my external timer script uses very little resources, so a second instance of NoteTab will seem like going squirrel hunting with a 12 gauge shotgun <grin>.


            Cheers,


            Eb

            --- In ntb-clips@yahoogroups.com, Al <acummingsus@...> wrote:
            >
            > ...
            > Oops someone is filling in the wizard fields and the clip can't
            > ^!FocusApp at the same time.
            >
            > Make an alternate ini so you can command line launch a 2nd Notetab that,
            > upon launch, is running a timer clip -- call this command line from the
            > first clip -- do so just before the wizard pops up
            >
            > in the 2nd (Notetab and) clip, in this clip have a repeat focusapp to
            > keep it focused so that the wizard of 1st clip is not in focus and thus
            > the person cannot fill in the wizard fields.
            > ...
          • Al
            Eb, Keep the 2nd Notetab minimal ie don t open a bunch of documents at startup, etc. and Notetab is known for its light resource consumption. Oh yes to yours
            Message 5 of 9 , Jun 14, 2010
            • 0 Attachment
              Eb,

              Keep the 2nd Notetab minimal ie don't open a bunch of documents at
              startup, etc. and Notetab is known for its light resource consumption.

              Oh yes to yours tiny resource you mentioned.

              Doesn't Windows oper system only allow one window in focus at a time?

              If your wizard is not in focus, methinks the person cannot fill in its
              fields.

              Seem to me you might need here an software program with the all of these
              tasks playing out in one window, not several windows.

              Is there an app out there that can fuse (windows into 1 window) or
              otherwise load two windows into one window. Alan.

              ebbtidalflats wrote:
              > Hi Al,
              >
              > Interesting idea -- using a clip from a second instance of NoteTab.
              > I may give it a try, just for education. I don't see how this will overcome the focus of the wizard.
              >
              > By the way, when running my external timer script uses very little resources, so a second instance of NoteTab will seem like going squirrel hunting with a 12 gauge shotgun <grin>.
              >
              >
              > Cheers,
              >
              >
              > Eb
              >
              > --- In ntb-clips@yahoogroups.com, Al <acummingsus@...> wrote:
              >
              >> ...
              >> Oops someone is filling in the wizard fields and the clip can't
              >> ^!FocusApp at the same time.
              >>
              >> Make an alternate ini so you can command line launch a 2nd Notetab that,
              >> upon launch, is running a timer clip -- call this command line from the
              >> first clip -- do so just before the wizard pops up
              >>
              >> in the 2nd (Notetab and) clip, in this clip have a repeat focusapp to
              >> keep it focused so that the wizard of 1st clip is not in focus and thus
              >> the person cannot fill in the wizard fields.
              >> ...
              >>



              [Non-text portions of this message have been removed]
            • Al
              FWIW always on top a windows thing can optionally set any window to behave like this.
              Message 6 of 9 , Jun 14, 2010
              • 0 Attachment
                FWIW

                "always on top"

                a "windows thing" can optionally set any window to behave like this.

                ebbtidalflats wrote:
                > Hi Al,
                >
                > Interesting idea -- using a clip from a second instance of NoteTab.
                > I may give it a try, just for education. I don't see how this will overcome the focus of the wizard.
                >
                > By the way, when running my external timer script uses very little resources, so a second instance of NoteTab will seem like going squirrel hunting with a 12 gauge shotgun <grin>.
                >
                >
                > Cheers,
                >
                >
                > Eb
                >
                > --- In ntb-clips@yahoogroups.com, Al <acummingsus@...> wrote:
                >
                >> ...
                >> Oops someone is filling in the wizard fields and the clip can't
                >> ^!FocusApp at the same time.
                >>
                >> Make an alternate ini so you can command line launch a 2nd Notetab that,
                >> upon launch, is running a timer clip -- call this command line from the
                >> first clip -- do so just before the wizard pops up
                >>
                >> in the 2nd (Notetab and) clip, in this clip have a repeat focusapp to
                >> keep it focused so that the wizard of 1st clip is not in focus and thus
                >> the person cannot fill in the wizard fields.
                >> ...
                >>
              • ebbtidalflats
                I m planning a field test of your ideas next week. Currently the problem is to keep everything in a single library, for both instances of NTP. And the only
                Message 7 of 9 , Jun 17, 2010
                • 0 Attachment
                  I'm planning a field test of your ideas next week. Currently the problem is to keep everything in a single library, for both instances of NTP. And the only clip I can run from NoteTab's command line is the OnOpen clip, which I need for other things. I'm trying various conditionals in OnOpen.

                  I'll post the results here when I have some.

                  Cheers,


                  Eb


                  --- In ntb-clips@yahoogroups.com, Al <acummingsus@...> wrote:
                  >
                  > Eb,
                  >
                  > Keep the 2nd Notetab minimal ie don't open a bunch of documents at
                  > startup, etc. and Notetab is known for its light resource consumption.
                  >
                  > Oh yes to yours tiny resource you mentioned.
                  >
                  > Doesn't Windows oper system only allow one window in focus at a time?
                  >
                  > If your wizard is not in focus, methinks the person cannot fill in its
                  > fields.
                  >
                  > Seem to me you might need here an software program with the all of these
                  > tasks playing out in one window, not several windows.
                  >
                  > Is there an app out there that can fuse (windows into 1 window) or
                  > otherwise load two windows into one window. Alan.
                  >
                  > ebbtidalflats wrote:
                  > > Hi Al,
                  > >
                  > > Interesting idea -- using a clip from a second instance of NoteTab.
                  > > I may give it a try, just for education. I don't see how this will overcome the focus of the wizard.
                  > >
                  > > By the way, when running my external timer script uses very little resources, so a second instance of NoteTab will seem like going squirrel hunting with a 12 gauge shotgun <grin>.
                  > >
                  > >
                  > > Cheers,
                  > >
                  > >
                  > > Eb
                  > >
                  > > --- In ntb-clips@yahoogroups.com, Al <acummingsus@> wrote:
                  > >
                  > >> ...
                  > >> Oops someone is filling in the wizard fields and the clip can't
                  > >> ^!FocusApp at the same time.
                  > >>
                  > >> Make an alternate ini so you can command line launch a 2nd Notetab that,
                  > >> upon launch, is running a timer clip -- call this command line from the
                  > >> first clip -- do so just before the wizard pops up
                  > >>
                  > >> in the 2nd (Notetab and) clip, in this clip have a repeat focusapp to
                  > >> keep it focused so that the wizard of 1st clip is not in focus and thus
                  > >> the person cannot fill in the wizard fields.
                  > >> ...
                  > >>
                  >
                  >
                  >
                  > [Non-text portions of this message have been removed]
                  >
                • ebbtidalflats
                  Spoke too soon . The 2nd NT instanced worked, though there are two popups, the 2nd window, which must be cleared, then reinstated after the timeout, and the
                  Message 8 of 9 , Jun 18, 2010
                  • 0 Attachment
                    Spoke too soon <g>.

                    The 2nd NT instanced worked, though there are two popups, the 2nd window, which must be cleared, then reinstated after the timeout, and the popup message. It's a bit annoying to have the double popup, but it works a bit better than the WSH script.

                    Thanks Al. Some comments to your (and my) post below.


                    Eb


                    --- In ntb-clips@yahoogroups.com, "ebbtidalflats" <ebbtidalflats@...> wrote:
                    >
                    > I'm planning a field test of your ideas next week.

                    Got to it yesterday.

                    > ...
                    > only clip I can run from NoteTab's command line is the OnOpen

                    I hadn't read the latest commandline arguments. Specifying a clip by name works.


                    >
                    > --- In ntb-clips@yahoogroups.com, Al <acummingsus@> wrote:
                    > > ...
                    > > Keep the 2nd Notetab minimal ie don't open a bunch of documents at
                    > > startup, etc. and Notetab is known for its light resource consumption.
                    > > ...
                    > > If your wizard is not in focus, methinks the person cannot fill in its
                    > > fields.


                    That's the idea - stop that person from filling in fields, like in a timed test.
                  Your message has been successfully submitted and would be delivered to recipients shortly.