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

stopping a clip by detecting an unexpected key

Expand Messages
  • Don - HtmlFixIt.com
    I know you can stop a clip with control + alt. That is not what I am looking for. I have a clip that does a series of keystrokes. At the end of each
    Message 1 of 7 , Nov 20, 2008
    • 0 Attachment
      I know you can stop a clip with control + alt. That is not what I am
      looking for.

      I have a clip that does a series of keystrokes. At the end of each
      iteration I have to manually type "i" and "F10". This key combination
      "enters" what I have typed above. I want to manually enter it and if I
      enter it then go to the top of the clip and go again.

      If I enter anything other than these two keys in sequence, then I want
      the clip to terminate.

      Focus is NOT in notetab during this process.

      Is there a way to test for these two keys and if anything other than one
      or the other is pressed, bang the clip ends.

      I remember many moons ago having a clip that monitored keys and didn't
      act until a key was pressed for example and terminated if you pushed
      particular keys or something.

      I am searching the clip group archives. I find the search features of
      the list to be terrible. Maybe I don't know how to use them?

      Thanks in advance for suggestions.

      Don
    • Don - HtmlFixIt.com
      ... ^!IfTrue ^$IsAltKeyDown$ AddContraction ^!IfTrue ^$IsShiftKeyDown$ Loop-FindWord ^!IfTrue ^$IsCtrlKeyDown$ NextWord ^!Goto Loop-Keypress But I really don t
      Message 2 of 7 , Nov 20, 2008
      • 0 Attachment
        Okay, so far I have this:
        :Loop-Keypress
        ^!IfTrue ^$IsAltKeyDown$ AddContraction
        ^!IfTrue ^$IsShiftKeyDown$ Loop-FindWord
        ^!IfTrue ^$IsCtrlKeyDown$ NextWord
        ^!Goto Loop-Keypress

        But I really don't think this will work as it requires one of these and
        I have to stick it in a loop to do it.

        Can I capture each key press and then test if it is one or the other of
        the two that are acceptable?

        And if not, terminate?


        Don - HtmlFixIt.com wrote:
        > I know you can stop a clip with control + alt. That is not what I am
        > looking for.
        >
        > I have a clip that does a series of keystrokes. At the end of each
        > iteration I have to manually type "i" and "F10". This key combination
        > "enters" what I have typed above. I want to manually enter it and if I
        > enter it then go to the top of the clip and go again.
        >
        > If I enter anything other than these two keys in sequence, then I want
        > the clip to terminate.
        >
        > Focus is NOT in notetab during this process.
        >
        > Is there a way to test for these two keys and if anything other than one
        > or the other is pressed, bang the clip ends.
        >
        > I remember many moons ago having a clip that monitored keys and didn't
        > act until a key was pressed for example and terminated if you pushed
        > particular keys or something.
        >
        > I am searching the clip group archives. I find the search features of
        > the list to be terrible. Maybe I don't know how to use them?
        >
        > Thanks in advance for suggestions.
        >
        > Don
        >
        > ------------------------------------
        >
        > Fookes Software: http://www.fookes.com/
        > NoteTab website: http://www.notetab.com/
        > NoteTab Discussion Lists: http://www.notetab.com/groups.php
        >
        > ***
        > Yahoo! Groups Links
        >
        >
        >
        >
      • Dave
        Hi See if you can find the clip Simulated Keyboard 2002-09-20 THANKYOU DAVE M ... From: Don - HtmlFixIt.com To:
        Message 3 of 7 , Nov 21, 2008
        • 0 Attachment
          Hi
          See if you can find the clip "Simulated Keyboard 2002-09-20"
          THANKYOU DAVE M

          ----- Original Message -----
          From: "Don - HtmlFixIt.com" <don@...>
          To: <ntb-clips@yahoogroups.com>
          Sent: Friday, November 21, 2008 8:47 AM
          Subject: Re: [Clip] stopping a clip by detecting an unexpected key


          > Okay, so far I have this:
          > :Loop-Keypress
          > ^!IfTrue ^$IsAltKeyDown$ AddContraction
          > ^!IfTrue ^$IsShiftKeyDown$ Loop-FindWord
          > ^!IfTrue ^$IsCtrlKeyDown$ NextWord
          > ^!Goto Loop-Keypress
          >
          > But I really don't think this will work as it requires one of these and
          > I have to stick it in a loop to do it.
          >
          > Can I capture each key press and then test if it is one or the other of
          > the two that are acceptable?
          >
          > And if not, terminate?
          >
          >
          > Don - HtmlFixIt.com wrote:
          >> I know you can stop a clip with control + alt. That is not what I am
          >> looking for.
          >>
          >> I have a clip that does a series of keystrokes. At the end of each
          >> iteration I have to manually type "i" and "F10". This key combination
          >> "enters" what I have typed above. I want to manually enter it and if I
          >> enter it then go to the top of the clip and go again.
          >>
          >> If I enter anything other than these two keys in sequence, then I want
          >> the clip to terminate.
          >>
          >> Focus is NOT in notetab during this process.
          >>
          >> Is there a way to test for these two keys and if anything other than one
          >> or the other is pressed, bang the clip ends.
          >>
          >> I remember many moons ago having a clip that monitored keys and didn't
          >> act until a key was pressed for example and terminated if you pushed
          >> particular keys or something.
          >>
          >> I am searching the clip group archives. I find the search features of
          >> the list to be terrible. Maybe I don't know how to use them?
          >>
          >> Thanks in advance for suggestions.
          >>
          >> Don
          >>
          >> ------------------------------------
          >>
          >> Fookes Software: http://www.fookes.com/
          >> NoteTab website: http://www.notetab.com/
          >> NoteTab Discussion Lists: http://www.notetab.com/groups.php
          >>
          >> ***
          >> Yahoo! Groups Links
          >>
          >>
          >>
          >>
          >
          >
          > ------------------------------------
          >
          > Fookes Software: http://www.fookes.com/
          > NoteTab website: http://www.notetab.com/
          > NoteTab Discussion Lists: http://www.notetab.com/groups.php
          >
          > ***
          > Yahoo! Groups Links
          >
          >
          >
          >
        • ebbtidalflats
          Don, I don t know if I misread your needs, but if your focus is in another application - not in NoteTab - you will have trouble intercepting keystrokes, except
          Message 4 of 7 , Nov 21, 2008
          • 0 Attachment
            Don,

            I don't know if I misread your needs, but if your focus is in another
            application - not in NoteTab - you will have trouble intercepting
            keystrokes, except with that application, or a third party utility.

            If the application can capture keystrokes, and place them into the
            clipboard, use that technique, and the 'two-clips-suggestion" below.

            Normally, you can only INPUT text into NoteTab from another
            application by the Windows clipboard (OnClipBoardChange). Usually by
            selecting the desired text, for example something you've typed into a
            webpage form, and then pressing CTRL+C.

            Then you can process what you typed in the OnClipboardChange clip.
            For what you seem to want to do, you probably need to ENABLE capturing
            in your main clip (I'll use "mainclip" here), then interrogate for the
            desired keystrokes, and if matched, DISABLE capturing, call your main
            clip, process (or end), loop or whatever, clear the clipboard,
            reanable capture, and LOOP to your process.

            You would not be able to use the ALT key or the F10 key for this, as
            neither can be captured into the clipboard.


            An example of interaction between your clip and OnClipboardChange
            might be:


            H="OnClipboardChange"
            ^!IfFalse ^%capture% END
            ^!If "^$GetClipboard$"<>"enditerationkeys" END
            ;whatever keystroke combinations you like
            ^!Set %capture%=FALSE
            ^!Clip "mainclip" OPTIONAL_LABEL


            H="mainclip"
            :LOOP
            ;bypassed code here if you use the label

            ;enable capture wherever in your code
            ; you want to start monitoring

            :OPTIONAL_LABEL
            ;your process-end code
            ;followed by:
            ^!SetClipboard ^%EMPTY%
            ^!Set %capture%=TRUE
            ^!Goto LOOP


            Note: the reason for toggling clipboard capture is, to keep CLEARING
            the clipboard from triggering the OnClipboardChange code.
            Note2: Depending on the structure of your main clip, you may not need
            to make a specific call to it. On the other hand, making a specific
            call lets you pass a LABEL as argument, that the main clip can JUMP to.



            > Don - HtmlFixIt.com wrote:
            ...
            > > iteration I have to manually type "i" and "F10". This key
            ...
            > > Focus is NOT in notetab during this process.
          • Don Daugherty
            Don - HtmlFixIt.com wrote: I just ran across this thread (I m months behind in my reading of this group -- hard drive crashes, getting new computer, etc..)
            Message 5 of 7 , Jan 28, 2009
            • 0 Attachment
              Don - HtmlFixIt.com wrote:
              I just ran across this thread (I'm months behind in my reading of this
              group -- hard drive crashes, getting new computer, etc..)
              Does it have to be the "i", F10 sequence, or could you use a the
              Shift+Alt combo to trigger the desired event?
              If so, something like
              ^!If ^$Calc(^$IsShiftKeyDown$*^$IsAltKeyDown$)$ = 1 ...
              might do something useful for you.
              > Okay, so far I have this:
              > :Loop-Keypress
              > ^!IfTrue ^$IsAltKeyDown$ AddContraction
              > ^!IfTrue ^$IsShiftKeyDown$ Loop-FindWord
              > ^!IfTrue ^$IsCtrlKeyDown$ NextWord
              > ^!Goto Loop-Keypress
              >
              > But I really don't think this will work as it requires one of these and
              > I have to stick it in a loop to do it.
              >
              > Can I capture each key press and then test if it is one or the other of
              > the two that are acceptable?
              >
              > And if not, terminate?
              >
              >
              > Don - HtmlFixIt.com wrote:
              >
              >> I know you can stop a clip with control + alt. That is not what I am
              >> looking for.
              >>
              >> I have a clip that does a series of keystrokes. At the end of each
              >> iteration I have to manually type "i" and "F10". This key combination
              >> "enters" what I have typed above. I want to manually enter it and if I
              >> enter it then go to the top of the clip and go again.
              >>
              >> If I enter anything other than these two keys in sequence, then I want
              >> the clip to terminate.
              >>
              >> Focus is NOT in notetab during this process.
            • Don - HtmlFixIt.com
              ... Very interesting. Does every key that doesn t enter something on the screen when depressed generate a true/false? If so, then this raises all sorts of
              Message 6 of 7 , Jan 28, 2009
              • 0 Attachment
                Don Daugherty wrote:
                > Don - HtmlFixIt.com wrote:
                > I just ran across this thread (I'm months behind in my reading of this
                > group -- hard drive crashes, getting new computer, etc..)
                > Does it have to be the "i", F10 sequence, or could you use a the
                > Shift+Alt combo to trigger the desired event?
                > If so, something like
                > ^!If ^$Calc(^$IsShiftKeyDown$*^$IsAltKeyDown$)$ = 1 ...
                > might do something useful for you.

                Very interesting. Does every key that doesn't enter something on the
                screen when depressed generate a true/false?

                If so, then this raises all sorts of possibilities.

                Thanks Don for chiming in regardless of timing. Thought logged ...
              • Don Daugherty
                ... As far as I can find, only the pressing of Shift, Alt and Ctrl, and combinations thereof can be detected. Thus we can use the three you have already
                Message 7 of 7 , Jan 28, 2009
                • 0 Attachment
                  Don - HtmlFixIt.com wrote:
                  > Don Daugherty wrote:
                  >
                  >> Don - HtmlFixIt.com wrote:
                  >> I just ran across this thread (I'm months behind in my reading of this
                  >> group -- hard drive crashes, getting new computer, etc..)
                  >> Does it have to be the "i", F10 sequence, or could you use a the
                  >> Shift+Alt combo to trigger the desired event?
                  >> If so, something like
                  >> ^!If ^$Calc(^$IsShiftKeyDown$*^$IsAltKeyDown$)$ = 1 ...
                  >> might do something useful for you.
                  >>
                  >
                  > Very interesting. Does every key that doesn't enter something on the
                  > screen when depressed generate a true/false?
                  >
                  > If so, then this raises all sorts of possibilities.
                  >
                  > Thanks Don for chiming in regardless of timing. Thought logged ...
                  >
                  As far as I can find, only the pressing of Shift, Alt and Ctrl, and
                  combinations thereof can be detected. Thus we can use the three you
                  have already used, plus Shift+Ctrl, Shift+Alt and of course Ctrl+Alt,
                  which we know has already been pre-determined to terminate any Clip
                  being executed.
                Your message has been successfully submitted and would be delivered to recipients shortly.