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

Re: [Clip] capture command prompt output in notetab?

Expand Messages
  • Axel Berger
    ... Will a quick half-answer suffice? You can call the program in a clip with temp.txt and then open that file right after. I don t know how to wait for the
    Message 1 of 20 , Sep 6, 2008
      "Don - HtmlFixIt.com" wrote:
      > In fact I still hope that it may be and thus, I kept the
      > discussion here in hopes that someone would pop in with
      > the answer.

      Will a quick half-answer suffice? You can call the program in a clip
      with > temp.txt and then open that file right after. I don't know
      how to wait for the reappearance of the cursor in a clip, but a
      solution would be to place the command in a batch ending it with
      PAUSE.

      Axel
    • Alec Burgess
      Bob Gorman (bgorman@kncell.org) wrote (in part) (on 2008-09-06 at ... Great tip ... be careful not to run the clip while you have this clip or another open.
      Message 2 of 20 , Sep 6, 2008
        Bob Gorman (bgorman@...) wrote (in part) (on 2008-09-06 at
        09:29):
        > I find it so handy I put the clip on a button.
        > My version is simply:
        > ^$GetDosOutput("^?[Dos command=dir c:\projects\*.*]")$

        Great tip ... be careful not to run the clip while you have this clip or
        another open.
        Unlike attempting to run a clip from the clipbook, output from a clip
        executed from clipbar will happily overwrite the contents of the clip
        ... he said, having trashed his first attempt. :-[

        I changed it to:
        H=GetDOSOutput
        ^!set %theCommand%=^?[Dos command=dir D:\Temp\*.*]
        ^%theCommand%
        ^$GetDosOutput("^%theCommand%")$

        so that the command actually used is printed at the top and can be
        copied and used as a basis for the next command if desired.

        --
        Regards ... Alec (buralex@gmail & WinLiveMess - alec.m.burgess@skype)



        [Non-text portions of this message have been removed]
      • Bob Gorman
        ... That explains some anomalies I ve encountered. ... and can be copied and used as a basis for the next command if desired. Thank you, I like that.
        Message 3 of 20 , Sep 6, 2008
          Alec Burgess wrote:
          >
          > Bob Gorman (bgorman@...) wrote (in part) (on 2008-09-06 at
          > 09:29):
          > > I find it so handy I put the clip on a button.
          > > My version is simply:
          > > ^$GetDosOutput("^?[Dos command=dir c:\projects\*.*]")$
          >
          > Great tip ... be careful not to run the clip while you have this clip or
          > another open.

          That explains some 'anomalies' I've encountered.

          > Unlike attempting to run a clip from the clipbook, output from a clip
          > executed from clipbar will happily overwrite the contents of the clip
          > ... he said, having trashed his first attempt. :-[
          >
          > I changed it to:
          > H=GetDOSOutput
          > ^!set %theCommand%=^?[Dos command=dir D:\Temp\*.*]
          > ^%theCommand%
          > ^$GetDosOutput("^%theCommand%")$
          >
          > so that the command actually used is printed at the top
          and can be copied and used as a basis for the next command if desired.

          Thank you, I like that. Especially while testing
          I definitely wanted the command itself to be printed out at the top.

          As always, I tweaked it to my personal preferences:

          ^!set %theCommand%=^?[Dos command=dir c:\projects\*.*]
          ^%theCommand%
          ^$GetDosOutput("^%theCommand%")$

          The extra empty line at the beginning seems to work better for me.
          and I switched in my preferred default.

          All of us can always do better than any of us!

          Bob

          --
          Knowledge is NOT enough!
          Knowledge + Confidence enables Action.
          Vision + Action = Leadership!
          - Bob Gorman
          http://www.KnCell.org
          http://blog.KnCell.org


          [Non-text portions of this message have been removed]
        • Alec Burgess
          cc: to NTO Axel Berger (Axel-Berger@nexgo.de) wrote (in part) (on 2008-09-05 at ... I went to look for it - afaict the original creator has made it
          Message 4 of 20 , Sep 7, 2008
            cc: to NTO
            Axel Berger (Axel-Berger@...) wrote (in part) (on 2008-09-05 at
            03:54):
            > "Don - HtmlFixIt.com" wrote:
            > > Is there a way to grab the output?
            >
            > Probably a silly question:
            > Just adding "> file.txt" after the command does not work?
            >
            > N.B: For those who have not heard: 4DOS has become freeware!
            > Looking at the price I always said: "I must get it, but not right
            > now." Now I have and should have done a long time ago.

            I went to look for it - afaict the original creator has made it
            open-source. He appears to have developed something new while someone
            else has taken over the reins of the original 4DOS. Did you get it from
            http://4dos.zzl.org/ ?

            At least for me, the install procedure seemed very confusing ....

            Anyhow, I finally decided to try PowerShell (free from MSOFT) (works
            with WinXP and Vista notwithstanding " windowserver" in the link:
            http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx

            From links on its site and a little bit of googling I found two
            different but (I think) related IDEs (Integrated Development Environments):

            * PowerShellAnalyzer - http://powershell.com/announce/default.aspx#
            * PowerGUI - http://powergui.org/downloads.jspa


            PowerShell has bit of a learning curve but both IDEs offer really nice
            debugging line by line executions, while you're learning.
            PowerShellAnalyzer has a really neat feature: select some lines and
            execute them with Ctrl+F7
            Power GUI has (IMO) better integrated Help.

            They are both like Sheri's ClipCode Syntax on steroids :-)

            To bring it back to Notetab (and justify not throwing this directly to
            NTO) I think (though not yet tested) the same ^$GetDosOutput()$ clipbar
            we were discussing elsewhere in this thread should work with PowerPro.

            Sheri - you're into this kind of thing - have you (or anyone else here)
            used PowerShell?

            --
            Regards ... Alec (buralex@gmail & WinLiveMess - alec.m.burgess@skype)




            [Non-text portions of this message have been removed]
          • loro
            ... The last version is still available from jpsoft site. http://www.jpsoft.com/download.htm Lotta
            Message 5 of 20 , Sep 7, 2008
              Alec Burgess wrote:
              > Did you get it from
              >http://4dos.zzl.org/ ?
              >
              >At least for me, the install procedure seemed very confusing ....


              The last version is still available from jpsoft site.
              http://www.jpsoft.com/download.htm

              Lotta
            • Axel Berger
              ... I believe not. As far as I can remember I m running the last official verson from the original site, i.e. the one that used to be sold. ... Yes. It s DOS
              Message 6 of 20 , Sep 7, 2008
                Alec Burgess wrote:
                > Did you get it from http://4dos.zzl.org/ ?

                I believe not. As far as I can remember I'm running the last
                official verson from the original site, i.e. the one that used to be
                sold.

                > At least for me, the install procedure seemed very confusing

                Yes. It's DOS old-style. If you know your way around in there,
                replacing the standard COMMAND.COM is nothing special but looking at
                it from a Windows background it will be.

                I don't use it that much, but I have often felt the severe limits of
                the DOS batch command language, making what I wanted to do
                impossible or forcing a very roundabout way. 4DOS solves most of
                that at the price, at least for me for the time being, of a lot of
                concentrated help file reading.

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