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

5967Perl, GetOutput, Shell, etc. (was Highlighting text for programs)

Expand Messages
  • Jody
    Mar 3, 2001
      Hi Alan, Ray and Others,

      >^!Goto Exit^!IfAppOpen "C:\WINDOWS\System32\cmd.exe" skip
      >^!FocusApp "C:\WINDOWS\System32\cmd.exe"

      I thought maybe with all the different Windows systems out now
      the following bits and pieces posted by Eric in the past may be
      helpful for you on this thread. Perhaps Eric can update it for
      us. ;) In short though, Win95/98/ME use command.exe and WinNT
      (and I'm pretty sure Win2000) uses cmd.exe:

      Eric wrote:
      ^!DOS is similar to ^! except that the appropriate shell is invoked
      (command.com for Win95 and cmd.exe for WinNT) with the /c parameter.

      ^!RUN uses the old Windows function call to launch applications.
      Although it should be similar to ^!, it sometimes works better to
      launch some programs with this method.

      Somebody posted:
      > I've noticed that NTP 4.82 and the betas of 4.83 sometimes get
      > stuck when running the ^$GetOutput()$ and ^$GetDosOutput$
      > commands under Win ME. For example, the simple
      > ^!GetDosOutput("set")$
      > command always produces this problem (works fine in 9x and NT).

      I think I may have found an explanation for this now. It seems that
      Windows ME uses Cmd.exe to open a DOS shell rather than Command.com.
      Could you try the following to see if it works on your computer?

      ^$GetOutput("cmd.exe /c set")$

      > Unfortunately I don't have cmd.exe on my Win Me computer and I
      > have almost all Windows components installed.

      I noticed that the explanation I found about cmd.exe was misleading.
      Only NT uses that. WinME still uses command.com to open DOS
      sessions. Sorry about that.

      Oddly enough, I can't use the GetDosOutput command anymore on my
      Win95 machine with command.com commands (like Set and Dir). It used
      to work fine before and it still works on my Win98 machine.
      Obviously, something has changed on my system that affects this
      feature. There must be some settings that control how DOS sessions
      work, but I can't figure out what these are.


      I will add the following also:

      ^!Shell CommandLine (added in v4.82)
      Launches the specified file, program, or URL through the Windows
      shell. Proposed as a replacement for the default "^!" launch
      method. Example: instead of using "^!WordPad c:\autoexec.bat",
      use "^!Shell WordPad c:\autoexec.bat"


      ^!ShellWait CommandLine (added in v4.82)
      Similar to the ^!Shell command, but waits until the launched
      program is terminated before moving to the next Clip instruction.
      Unlike the ^!Wait command, you can continue editing files in
      NoteTab while the application is running. Example:
      ^!ShellWait WordPad c:\autoexec.bat

      Happy Clip'n!


      Subscribe, UnSubscribe, Options
    • Show all 14 messages in this topic