• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
getting no items from dropped clipping
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: General questions from a non-Applescript coder.
  • Next by Date: Finder: setting background image of icon view window?
  • Previous by thread: Re: tell statement changing
  • Next by thread: Finder: setting background image of icon view window?
  • Index(es):
    • Date
    • Thread