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

Clip responding to message box?

Expand Messages
  • kalasin22
    My clip runs, manipulates another program, and successfully returns to Notetab, but a Confirm Box is waiting for me. How do I program the clip to respond to
    Message 1 of 6 , Feb 29, 2004
      My clip runs, manipulates another program, and successfully returns
      to Notetab, but a Confirm Box is waiting for me.

      How do I program the clip to respond to the box with a YES answer?

      ~Kalasin
    • John Zeman
      ... Please define exactly what the confirm box is and what it is asking you. Also, you might post your clip here so we can analyze it. John
      Message 2 of 6 , Feb 29, 2004
        --- In ntb-clips@yahoogroups.com, "kalasin22" <Kalasin22@h...> wrote:
        >
        > My clip runs, manipulates another program, and successfully returns
        > to Notetab, but a Confirm Box is waiting for me.
        >
        > How do I program the clip to respond to the box with a YES answer?
        >
        > ~Kalasin



        Please define exactly what the confirm box is and what it is asking
        you. Also, you might post your clip here so we can analyze it.

        John
      • kalasin22
        ... There are two places where I wish NoteTab to respond to MsgBoxes. ^!Save ^!Set %MRow%=^$GetRow$; %MColumn%=^$GetCol$; %MTop%=^$GetRowTop$ ^!MENU
        Message 3 of 6 , Feb 29, 2004
          > Please define exactly what the confirm box is and what it is asking
          > you. Also, you might post your clip here so we can analyze it.


          There are two places where I wish NoteTab to respond to MsgBoxes.

          ^!Save
          ^!Set %MRow%=^$GetRow$; %MColumn%=^$GetCol$; %MTop%=^$GetRowTop$
          ^!MENU Tools/Launch Document
          ^!Delay 020

          ;msgbox appears here regarding the file being too big and
          ;using Wordpad instead. I have the delay here so I have
          ;enough time to respond to the box manually so the clip will continue.
          ;I know that I can change Launch Document to default to Worpad,
          ;but I prefer it set to Notepad.
          ;Here, I want to select "Yes" to using WordPad.

          ^!FocusApp *pad

          ;(other file manipulation)

          ;end of file manipulation
          ^!Keyboard Ctrl+S Alt+F x
          ^!ActivateApp
          ^!Delay 005

          ;msgbox appears here regarding refreshing file: Confirm [YES|NO] -
          ;Another application has modified <file>. Reload it?
          ;.... I want to select "Yes" here.

          ;Cursor defaults to top of file on reload. Resets Cursor to previous
          position.
          ^!SetView ^%MTop%:1
          ^!SetCursor ^%MRow%:^%MColumn%


          As it stands, the clip works, but I have to manually help twice. I'd
          like to get it so that everything is automatic.


          Thanks,

          ~Kalasin

          ---------------------------------------------

          OT to the above post, but along the same lines of analyzing
          clips that I have written:

          This is the clip I constructed from the previous help I received here.
          The clip works fine, but I'm only a novice at programming so I imagine
          there might be a few things that could be simplified.

          As for why I wrote the clip, when I'm typing stories directly into
          HTML,
          I prefer inserting my <I> or </I> one item at a time. And this sorts
          it out
          so that the same two-key combinaton inserts the appropriate one based
          upon what went before.

          ;Places cursor marker
          ^!InsertHtml ``

          ;Sets variables
          ^!Set %State-On%=<i>; %State-Off%=/i>; %Test%=; %Result%=

          ;Search backwards for previous "i>"
          ^!Find "i>" [TIBS]
          ^!IfError FirstInstance ELSE KeepGoing

          :KeepGoing
          ^!Select 0
          ^!MoveCursor -001

          ;Get full "i" phrase, set as %Test%
          ^!Select +003
          ^$GetSelection$
          ^!Set %Test%=^$GetSelection$

          ;Perform test
          ^!If ^%Test% = ^%State-On% TurnOff ELSE TurnOn

          :TurnOff
          ^!Set %Result%=</I>
          ^!Replace "``" >> "^%Result%" [TS]
          ^!Goto End

          :TurnOn
          ^!Set %Result%=<I>
          ^!Replace "``" >> "^%Result%" [TS]
          ^!Goto End

          :FirstInstance
          ^!Set %Result%=<I>
          ^!Replace "``" >> "^%Result%" [TBS]
          ^!Select 0
          ^!MoveCursor +003
          ^!Goto End

          :End
        • Alan C.
          ... [ . . ] ... (untested i don t have any large text files to test with plus busy elsewhere, etc. etc.) Nonetheless, next tend to be my approach. But, to do
          Message 4 of 6 , Feb 29, 2004
            On Sun, 29 Feb 2004 17:42:39 -0000, kalasin22 wrote:
            >> Please define exactly what the confirm box is and what it is asking
            >> you.  Also, you might post your clip here so we can analyze it.
            [ . . ]
            > msgbox appears here regarding the file being too big and
            > using Wordpad instead. I have the delay here so I have
            > enough time to respond to the box manually so the clip will continue.
            > I know that I can change Launch Document to default to Worpad,
            > but I prefer it set to Notepad.
            > Here, I want to select "Yes" to using WordPad.

            (untested i don't have any large text files to test with plus busy elsewhere, etc. etc.)
            Nonetheless, next tend to be my approach. But, to do so, you'd have to know or find out what file size separates notepad from wordpad.

            As related to (compared/contrasted to) interactivity, for example it is M.S. Windows interactivity dialog boxes be the concern here (well, 1 Ntab dialog too) . . . So, as far as

            (script/macro design) is concerned, I tend to try to take/command some more greater degree of direct control by the use of

            testing condition(s), use of label in clip code, use of if tested for wordpad then goto the label wordpad wherein lies a command to launch it using wordpad.

            On the other hand, wordpad launch section of clip gets skipped (jumped over) if the file be of small enuff size to already been launched in notepad. close then open the ntab version of the doc (unless exists another command to auto reload do so minus the interactivity prompt).

            two help files. helpful stuff in help file number one entitled "clip basics". helppful stuff in help file number 2 which is help > help on clip programming.
            ---------

            ^!Set %mydoc%="^**"
            ^!If ^$GetFileSize(^%mydoc%)$ > digits_of_size_go_here wordpad
            ^!Close ^%mydoc%

            ;(so the doc can be closed, not open)
            ;clip basics says next line can replace your menu command
            ^!^%mydoc%
            ;^!MENU Tools/Launch Document
            ^!Delay 020

            ;msgbox appears here regarding the file being too big and
            ;[ . . ]

            ^!Goto Skip_2
            :wordpad
            ^!Shell "WordPad ^%mydoc%"
            ;[ . . ]
            ^!ActivateApp
            ^!Open ^%mydoc%

            --
            Alan.
          • hugo_paulissen
            K, I would try to avoid the messgae boxes. Instead of using launch you could actually specify the application of your choice to open your document... Change...
            Message 5 of 6 , Feb 29, 2004
              K,

              I would try to avoid the messgae boxes.

              Instead of using launch you could actually specify the application of
              your choice to open your document...

              Change...
              ^!MENU Tools/Launch Document

              into:
              ...(one line; I got an error message without GetShort)...
              ^!Shell WordPad.exe ^$GetShort("C:\Documents and Settings\NAME\My
              Documents\blabla.rtf")$

              Hugo
            • hugo_paulissen
              Following up on my previous post I d suggest to close the file before you edit it in another application... ... Then after saving it in that app, activate
              Message 6 of 6 , Feb 29, 2004
                Following up on my previous post I'd suggest to close the file before
                you edit it in another application...

                > ^!FocusApp *pad
                >
                > ;(other file manipulation)
                >
                > ;end of file manipulation
                > ^!Keyboard Ctrl+S Alt+F x
                > ^!ActivateApp
                > ^!Delay 005

                Then after saving it in that app, activate NoteTab and open it again -
                you should be able to figure out which file it was you were working
                on.

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