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

151Re: Is it possible to use the see command line tool in a mode script?

Expand Messages
  • michael_j_barber
    Jan 9, 2008
      That is remarkably strange. I tried ending with & and redirecting the output to /dev/null
      individually, neither of which worked, but it didn't occur to me to try the combination you
      used. At any rate, thanks for the workaround!

      I can't believe that is the desired behavior, so I think I'll go ahead and file a bug a report
      anyway.


      --- In SubEthaEdit@yahoogroups.com, Jeff Groth <jtgroth.lists@...> wrote:
      >
      > After some research and experimentation I was able to get the desired
      > result with the following:
      >
      > do shell script "echo some text | /usr/bin/see &> /dev/null &"
      >
      > Jeff
      >
      > On Jan 8, 2008, at 1:06 PM, michael_j_barber wrote:
      >
      > > Consider the following three AppleScripts:
      > >
      > > -- script 1
      > > do shell script "echo some text | /usr/bin/see"
      > >
      > > on seescriptsettings()
      > > {displayName:"Pipe into see"}
      > > end seescriptsettings
      > >
      > > -- script 2
      > > do shell script "echo some text | open -f"
      > >
      > > on seescriptsettings()
      > > {displayName:"Pipe into open"}
      > > end seescriptsettings
      > >
      > > -- script 3
      > > do shell script "echo some text | /usr/local/bin/mate"
      > >
      > > on seescriptsettings()
      > > {displayName:"Pipe into mate"}
      > > end seescriptsettings
      > >
      > > -- end scripts
      > >
      > > The three scripts are all similar in intent. You add them to a mode
      > > and have an item added
      > > to the mode menu. Each one produces the text "some text\n" and
      > > pipes it into a shell
      > > command to open a new document in an application. The first one
      > > uses 'see' to open it in
      > > SubEthaEdit, the second uses 'open -f' to open it in TextEdit, and
      > > the third uses 'mate' to
      > > open it in TextMate.
      > >
      > > The second and third scripts work fine. The first one does not. The
      > > new SubEthaEdit
      > > document does not open, and SubEthaEdit becomes unresponsive. By
      > > killing the 'see'
      > > process using the terminal, you can actually get the document to
      > > open, however. Further,
      > > just running the AppleScript from the Script Editor works fine,
      > > with SubEthaEdit
      > > immediately opening the document.
      > >
      > > Any suggestions on getting this working? Is this a bug, or am I
      > > just missing something?
      >
    • Show all 4 messages in this topic