Re: theText is empty. why?
Re: theText is empty. why?
- Subject: Re: theText is empty. why?
- From: Gnarlodious <email@hidden>
- Date: Sat, 30 Apr 2005 13:54:10 -0600
Title: Re: theText is empty. why?
To simplify:
do shell script "/Developer/Tools/DeRez -e -only 'TEXT' clip | grep '\\/\\* .* \\*\\/' | sed 's/^.*\\/\\* //;s/ \\*\\/$//' | tr -d '\\n'"
Put a text clipping in your root level called “clip” and run the above script. What happens?
I suspect your script is not even finding the clipping, since shell in Applescript uses / as the working path. Your folder action is probably sending an incomplete path to the POSIX statement.
Maybe someone else can clarify, I personally don’t use Folder Actions, they’re too flaky.
-- Gnarlie
Entity doug rogers spoke thus:
> property devToolsPath : "/Developer/Tools/" -- path to Apple Developer
> Tools
> on adding folder items to this_folder after receiving theFile
> -- from gnarlodious
> set clipPath to quoted form of POSIX path of theFile
> set cmd to devToolsPath & "DeRez -e -only 'TEXT' " & clipPath & " |
> grep '\\/\\* .* \\*\\/' | sed 's/^.*\\/\\* //;s/ \\*\\/$//' | tr -d
> '\\n'"
> set theText to do shell script cmd
> display dialog theText & "There are " & (count of items of theText) &
> " items." --zero items
> ... more script that does something with the text I want to get from
> the clipping ...
> There is a crack in everything. That's how the light gets in.
> __________<http://home.golden.net/~samu>__________
> _______________________________________________
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden