P.S. Make sure to remove the line break that Google Groups inserted
into the line marked off as being intended as all one line.

On Oct 30, 12:53 am, "Jon Stovell (a.k.a. Sesquipedalian)"
<[EMAIL PROTECTED]> wrote:
> I fiddled with this a bit. It seems the qs command chokes on package
> files that are piped to it. Oddly, those same package files are
> handled perfectly when given as arguments instead of being piped to
> the command.  So I whipped up an Applescript to do the job
>
> using terms from application "Quicksilver"
>         on process text inputString
>
>                 set foundfiles to do shell script "mdfind " & inputString
>
>                 --The following is all one line
>                 set foundfiles to "\"" & my findReplace(return, "\"" & space 
> & "\"",
> foundfiles) & "\""
>                 --
>
>                 do shell script "qs " & foundfiles
>
>         end process text
> end using terms from
>
> on findReplace(findText, replaceText, sourceText)
>         set ASTID to AppleScript's text item delimiters
>         set AppleScript's text item delimiters to findText
>         set sourceText to text items of sourceText
>         set AppleScript's text item delimiters to replaceText
>         set sourceText to sourceText as text
>         set AppleScript's text item delimiters to ASTID
>         return sourceText
> end findReplace
>
> On Oct 29, 11:43 pm, Chris Cairns <[EMAIL PROTECTED]> wrote:
>
> > i did not post the error that i got earlier because i thought you  
> > would be able to reproduce it and also the error did no seem to make  
> > sense.
> > this is the error when i run the script from Applescript or when i run
> > mdfind r | qs directly from terminal
>
> > 2008-10-30 09:09:46.059 qs[618:10b] *** Terminating app due to  
> > uncaught exception 'NSInvalidArgumentException', reason: '[NOTE: this  
> > exception originated in the server.]
> > *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil value  
> > (key: NSStringPboardType)'
> > 2008-10-30 09:09:46.081 qs[618:10b] Stack: (
> >     2418475627,
> >     2528878747,
> >     2418474385,
> >     2457741414,
> >     2457739273,
> >     2418498250,
> >     2418498354,
> >     11601,
> >     10958,
> >     10741
> > )
> > sh: line 1:   617 Done                    mdfind r
> >        618 Trace/BPT trap          | qs

Reply via email to