• 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
new todo with url reference
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new todo with url reference


  • Subject: new todo with url reference
  • From: James Roberts <email@hidden>
  • Date: Tue, 05 Feb 2013 04:29:55 -0500

I have a script that creates a new todo based on a Mail rule. For sometime now (ML ?) it has periodically failed to set the URL pointing back to the original msg. I finally sat down and figured out the problem. If a msg id contains % calendar refuses to set the url.

message id "510C483C.1080407@name.com” works fine
message id "2O000000013922-**MSO20130201%@anothername.com” fails

if I escape the % in the id I get a “expecting “” found %” error. If I parse out the % the url sets but of course does not point to a real msg. If I drag the msg into the todo in BusyCal (not scriptable) the url is set and the added % don’t seem to cause any problems.
Does anyone know a way that I can format msgURL so Calendar will just  set the url and not worry about the content?

on createTodo(todoMsg, msgId)
set theDueDate to (current date) + 5 * days
set msgUrl to ("message:<" & msgId & ">")
tell application "Calendar"
tell calendar id "7F1A8DB2-DC7B-4AF2-BAE6-C003E14ECF8F"
make new todo at end with properties {summary:todoMsg, due date:theDueDate, priority:high priority, url:msgUrl}
end tell
end tell
end createTodo


James Roberts
email@hidden

"Nothing travels faster than the speed of light, with the possible exception of
bad news, which obeys its own set of laws" ~ Douglas Adams




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: new todo with url reference
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Aperture Script - Can't replicate user problem
  • Next by Date: Re: new todo with url reference
  • Previous by thread: Aperture Script - Can't replicate user problem
  • Next by thread: Re: new todo with url reference
  • Index(es):
    • Date
    • Thread