getting no items from dropped clipping
getting no items from dropped clipping
- Subject: getting no items from dropped clipping
- From: doug rogers <email@hidden>
- Date: Wed, 27 Apr 2005 15:47:25 -0400
on adding folder items to this_folder after receiving theFile
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 & return & "There are " & (count of items of
theText) & " items." -- 0 items
tell application "iCal"
launch
repeat with m from 1 to (count of paragraphs of theText)
set NewToDo to make new todo at end of todos of calendar 1 with
properties ¬
{due date:(current date), priority:3, summary:(paragraph m of
theText)}
end repeat
end tell
--next, delete theFile
end adding folder items to
With parts borrowed from Gnarly, this is my script. I swear it kind of
worked the first time I used it, but it sent the two paragraphs of
items as a one item To Do separated by a period. Now I will be the
first to admit I don't understand what is happening in the grep shell
script, but I suspect it has something to do with my *now* getting no
items in theText.
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