ICal - AppleScript To Convert ToDos To Events

I use a iMac G4 800MHz 15" running 10.4.11. I have used Chronos Personal Organizer 4.5.0 for quite some time. I want to transfer my approximately 21,000 CPO calendar items (all are To Dos) to iCal. This number includes approximately 5,000 items that I transferred from DateBook Pro to CPO a few years ago.
I downloaded the trial version of Chronos SOHO Organizer 6.5.4 and the accompanying converter. I converted my three CPO calendars and then imported them to SOHOO 6.5.4 successfully. Then, I exported each of them from SOHOO 6.5.4 as a ".ics" file. I imported each of these ".ics" files into iCal successfully. However, iCal does not display To Do items embedded in the calendar as does CPO and SOHOO. iCal segregates the To Do items into the To Do list window. Therefore, I wish to convert all of my 21,000 iCal calendar items from To Do items to Events, such that iCal will display them in the calendar display (day / week / month) on the original date that I assigned to each of them. During the conversion from To Do to Event, I wish to retain all text / remarks / notes.
Can anyone suggest an AppleScript that will perform this conversion? I have searched the web exhaustively without any success. Would anyone like to take a stab at writing an AppleScript that performs this conversion? I have read many postings on various forums that wish to do the same thing as me, eg. transfer data from either CPO or SOHOO to iCal but embed the To Do items in the Event calendar.
Thank you.
Kurt R. Todoroff

This is relatively straightforward, but you should be aware of a couple of issues:
A Task, "To Do" in iCal, has no duration and iCal does not seem to parse SOHOO's DUE parameter correctly so it cannot have a time or alarm either.
If you are prepared to have your tasks appear on their original days within iCal, this can be done, but you would either need to choose to have them appear as all day events or events of a fixed duration (e.g. none) and at a fixed time (e.g. 9am).
You could try this (which is the allday event version):
Make a new calendar in iCal called "Test"
Import your .ics file - choosing to add the events to the Test calendar.
Copy and paste the text between the lines (below) into Script Editor and press Run
If you're happy with the result, simply rename your Test calendar.
If not, or I have misunderstood what you want to do, post back.
Good luck, and _*make sure you have taken backups before starting*_.
tell application "iCal"
repeat with calNum from 1 to (count of calendars)
if name of calendar calNum is "Test" then
exit repeat
end if
end repeat
set todoList to todos of calendar calNum
repeat with theTodo in todoList
set dueDate to due date of theTodo
set theSummary to summary of theTodo
set theDescription to description of theTodo
try
set dummy to length of (theDescription)
on error
set theDescription to ""
end try
try
set makeEvent to (make new event at the end of events of calendar calNum with properties ¬
{start date:dueDate, end date:dueDate, summary:theSummary, description:theDescription, allday event:true})
delete theTodo
on error
loop
end try
end repeat
end tell
-------------

Similar Messages

  • TS4337 Ical/applescript/animator can a customised event with added fields be generated?

    Yet again i find myself trawling the Internet to find the best solution to my quest.
    I run my own business and share jobs with a select amount of people through iCal on our iphone's ipad's and Macbooks as do my associate's. Currently we use the generic event that is created in iCal but most of our information has to go into note's at the bottom of the event, which frankly is a pain in the ****. Why Apple with the million's of $$$ in cash they seem to have in the bank haven't given the billions of loyal customer's the freedom to create their own fully customisable event's is beyond me, anyway back to the propblem.
    What if any is the best way to approach this problem and giving us a solution?
    Do we use a third party software like Bento 4 or Filemaker Pro?
    Do we use Applecript or Animator or Both?
    we are not looking to set up a database, once every six months I backup my calandar to Excel and that is it.
    Any suggestions would be appriciated. Many Thanks in advance.

    Hi Trinidad,
    Putting the additaional columns in the table will result in me storing redundant info in the specific table.
    The values are already stored in other related tables and I'd just like to display them as additional info fields.
    .Ben

  • Creating Todo or Event in iCal from Email messages

    Here is the workflow I would like to create -
    I have a series of e-mail messages that I have placed in a folder called "Today" in Mail.
    I want to copy the text of these messages, Then have that text placed in one ( or more) Todo items for today.
    I seem to have been able to get the messages selected, text copied - but I don't see an automator item to create a new todo item. -
    Ideally, I would be able to set an alarm on this, so that I can have iCal automatically notify me of a list of things I need to address today.
    Any help??\ Thanks
    Brian

    I to have been wishing to figure out this process. I
    have even tried to create an Applescript that would
    open applications, however, I can't seem to program a
    pretermined text or copy text and paste into iCal.
    someone please find an answer, this would be great!
    Automator can't do it, and You can't just cut + paste text into iCal. You need to make events and todos in a iCal calenader and set their properties. ie:
    tell application "iCal"
    activate
    make new event at end of events of calendar 1 with properties {summary:"test"}
    end tell
    Look at iCal's AppleScript dictionary for syntax, and head to AS forum there are good people willing to help you.

  • SAFELY convert csv calendar events to ics formate for iCal?

    How do I SAFELY convert csv calendar events to ics formate for iCal?

    CSV to iCal Calendar Convertor • Manas Tungare

  • In iCal how do i set an event every 3 months

    In iCal how do i set an event every 3 months.

    Sk8trdad,
    I presume that your question relates to the Calendar App on the iPad.
    You have to use the "repeat>Custom" setting on the Desktop version of iCal.

  • Can't add a new event to iCal on my iMac - but the event sync's to my iPad - is this a Lion problem? iCloud is on.

    Can't add a NEW EVENT to my iCal on my iMac- however the event is sync'd to my iPad with no problem. iCloud is turned on for iCal. Is this a Lion problem or something turned pff. I cannot find an answer. Help?
    Williamfronsc

    William,
    It is a possibility that you are adding new events to your "On My Mac" calendars.
    "On My Mac" calendars will not sync with iCloud. After backing up the "On My Mac" calendars, and ensuring that all events are duplicated on your iCloud calendars you can delete any "On My Mac" calendars.
    For further troubleshooting advice read iCloud: Troubleshooting iCloud Calendar.

  • ICal for iPhone. View all events as a list without having to type into the earth box.

    iCal for iPhone. View all events as a list without having to type into the earth box.
    On the previous software version I used to be able to view all my calendar events as a list by clicking on the magnifying glass. Now you have to type into the search dialog box for a list to populate. This is very frustrating and annoying because I much prefer the list format to populate everything unless I specify what I am looking for into the search box. Is there a way to view all the events as a list without having to type anything into the search box?

    And you are aware of the possible options for listing the months and having an optional export value for each month.
    For listing the months, you can use a number, a 3 character string, or the full name.
    For the export value, the full name, the 3 character value, the 1-2 number, or the 0-11 JavaScript value.
    I would look at deciding how you want to populate the drop down box and build a one page form with just this field. You can then insert that page into a PDF and copy the field as needed and then delete the inserted page. Or you could create an FDF file to create the drop down box.

  • ICal How do I enter an event without it being a quick event?

    In iCal, when trying to add an event, I click on "File" then "New Event".   A "quick even" box open which I find difficutl to use.   Under iCloud calender in Safari, a "New Event" opens a boxt with details that are useful.   Is there a way to create an even in iCal with detailed information to input?

    Hi JeffcNick!
    Try the steps listed in this article:
    Mac Basics: Calendar keeps your appointments
    http://support.apple.com/kb/HT5978
    Schedule an event on a calendar
    Calendar lets you add events in multiple ways:
    Double-click anywhere on the calendar to add an event at that time. The Inspector window that appears allows you to add invitees, set a time, location and more.
    Take care, and thanks for visiting the Apple Support Communities.
    Cheers,
    Braden

  • ICal prints times in front of event entries, I don't want these times entered. How to remove them?

    iCal prints times in front of event entries, I don't want these times entered. How to remove them?

    Go to your Flagged Photos Smrt Album on the Left.
    Command - a will select All
    Then File -> New -> Album
    Regards
    TD

  • How do you date and time stamp iCal entries?  We share an event calendar and need to know when a new event was entered into iCal.

    How do you date and time stamp iCal entries?  We share an event calendar and need to know when a new event was entered into iCal.

    BKBK,
    Thank you for your response. That does adequately cover the
    client-originated sessions, but still leaves the ability I am
    looking for unavailable.
    It did serve to definitively answer my most pressing
    question, however, with this statement:
    Note: ColdFusion cannot create a session if an initiator
    application uses a SendGatewayMessage method to start an
    interaction with a client, such as an SMS user. In this case, the
    sending code must keep track (for example, in a database) of the
    messages it sends and their destinations. When a response event
    arrives, it can look up the origniatorID to determine whether it
    was in response to an outgoing message.
    I will play around with the Application scope to see if there
    might be a workable solution there.
    RLS

  • Applescript to convert PDF to JPEG using Preview?

    I know there's an existing script available on the internet that converts PDFs to JPEGs (it's here: http://macscripter.net/viewtopic.php?id=25350) BUT, for whatever reason, the quality, even when set to 600dpi, is crap. I get better results simply opening the PDF in Preview then saving as JPEG... even a 150dpi JPG from Preview is higher quality than a 600dpi file from this script I found...
    So, what I need help with is creating a applescript that converts PDF's to JPEGs using Preview (or whatever, as long as the quality of the JPEG is good). I have very little scripting experience so help is appreciate.
    Ideas?
    Thanks.

    Frank Caggiano wrote:
    Decided to finish this up as an interesting exercise. Hope you find it useful.
    One question for the  Applescripters here. The Automator action run as a shell script seems to return a list of filename aliases but the return value while looking like a list didn't behave as a list. I managed to rip it apart to get to the filepaths and the script works but it seems really kludgey . So my question is given the return of the Automator run as a do shell script what is a more correct way to handle it?
    Convert PDF to JPG
              © 2011 Frank Caggiano
              GNU Public License
              Convert pfd files to jpg images.
              The converted JPG files wil have the name of the original PDF files with the extension changed to JPG.
              The actual conversion uses the Automator action Render PDF Pages as Images.
              The user needs to create an Automator action with Render Pages as Images as the single action.
              Set the parameters for the conversion in the action.
              NOTE: this script assumes you're converting to jpg files If you select another output format in the action this script will
              need to be modified.
    -- choose PDF files
    try
              set sourceFiles to choose file with prompt "Select PDF files" of type {"com.adobe.pdf"} with multiple selections allowed
    on error msg number n
              if n ≠ -128 then
                        error "Unknow error: " & msg & space & n
              else
      quit
              end if
    end try
    -- choose destination folder
    try
              set destFolder to choose folder with prompt "Select Destination Folder"
    on error msg number n
              if n ≠ -128 then
                        error "Unknow error: " & msg & space & n
              else
      quit
              end if
    end try
    set destFolder to quoted form of POSIX path of destFolder
    -- select workflow
    try
              set workFlow to choose file with prompt "Select Work Flow" of type {"com.apple.automator-workflow"}
    on error msg number n
              if n ≠ -128 then
                        error "Unknow error: " & msg & space & n
              else
      quit
              end if
    end try
    set workFlow to POSIX path of workFlow
    repeat with sourceFile in sourceFiles
      -- get base name of the source file
              set bName to do shell script "basename " & quoted form of POSIX path of sourceFile
      -- Strip off the extension
              set text item delimiters to "."
              set bName to text item 1 of bName
              try
                        set res to do shell script "automator -i " & quoted form of POSIX path of sourceFile & space & workFlow
              on error msg number n
                        error msg & space & n
              end try
      -- Seems strange to  do it this way but it works
              set text item delimiters to "\""
              set theList to text items of res
    We go through the list of converted files. If there is more then one then the second and subsequent files
    will get and integer added to the name to avoid conflict.
              set cnt to 0
              repeat with convertedFile in theList
                        if convertedFile does not contain "alias" and convertedFile does not contain "}" then
                                  set fullPath to quoted form of POSIX path of convertedFile
                                  if cnt ≠ 0 then
                                            do shell script "mv " & fullPath & space & destFolder & bName & "_" & cnt & ".JPG"
                                  else
                                            do shell script "mv " & fullPath & space & destFolder & bName & ".JPG"
                                  end if
                                  set cnt to cnt + 1
                        end if
              end repeat
    end repeat
    Hi Frank--
    I tried the script you wrote and created the Automator workflow with the single action as requested, saved it to the desktop then selected it when your script's dialogue requested it. However, at that point your script game me the following error. Ideas? I did save the workflow as a workflow and I selected it directly, so I'm not sure why it thinks that the "workflow file does not exist" ? :
    error "The workflow file does not exist. 255" number -2700 from «script» to item

  • Convert Album to Event

    Simple question. How do you convert an album in to an Event?

    iPhoto 07 converts Rolls into Events, not albums.
    To convert an album then select all the photos in the album, flag them and go Events -> Create Event from Flagged Photos.
    Remember, Events are essentially the Rolls feature from v6, a pic can only be in one Event, though many Albums.
    Regards
    TD

  • ICal Sync- Not showing location of event

    Hello, my first ipod is becoming a nuisance. I want to be able to see more detail of the calendar events sent from ical or entourage for that matter. On the ipod each event shows up with the summary, date and time. No other information is shown. I need the location of these events. They are shown clearly on ical and entourage. Is this a limitation to the calendar on the ipod or am I doing something wrong? I have synced the calendar with iTunes and exported the file from ical into appropriate folder on the ipod. Both ways do not work.
    Any help will be welcome.

    David,
    If I am understanding you correctly then your first issue is that while a person's birthdate can be an event in iCal and shows up as an event in the iPod calendar after you sync, if you pull up the person's contact information on the iPod it does not show the birthdate, even if you have manually added birthdate as a custom field in Address Book. That may be an iPod limitation. The iPod contact display includes names, addresses, phone numbers, web address, and notes. That's about it I think, although I haven't dissected it much. What I personally have always done is put birthdate in the notes. However, if iTunes sync treats custom fields in AB the same way it handles meeting locations, then the custom fields MAY be being passed to the iPod, they are just being ignored. If so, then it probably wouldn't be too difficult to write a Perl script to copy the birthdates into the notes field so that they show up on the iPod. That might be useful to folks, so I'll look into it.
    The second issue you describe is AB's import ignoring the birthdate field that you have in your tab-delimited Filemaker Pro output file. If that doesn't work my only guess would be that it is because birthdate is not a standard field in Address Book. This may be a limitation of the import that would affect other non-standard fields as well, like Nickname or Maiden Name. I'm afraid I haven't played with the import though, so I do not know for certain.
    Brendan

  • ICal is not showing some past events since I upgraded to Lion.

    iCal is not showing some past events since I upgraded to Lion. I can find the past events in mail but if I click and open them, they are not showing up on the calendar. Advice? I am trying to recreate my schedule from past meetings.

    I love computers.
    Have managed to fix this already. Been working the issue for a few days now, and a few minutes after writing the above post I decided to reset the Time Capsule to factory default settings.
    After entering all my details again (used same network names, passwords etc) the Time Capsule was rebooted. When it came back on line - guess what? Yep, the MyBook WD drive is now visibile. I can connect via the network from my other machines to the drive, and iTunes is back.
    So - thought I would post my resolution in case it helps others.

  • I am trying to use automator to open a safari popup window that will automatically log me into whatever account and I attempted to type up an applescript that utilized the "System Events" function with no avail, any ideas?

    I am trying to use automator to open a safari popup window that will automatically log me into whatever account and I attempted to type up an applescript that utilized the "System Events" function with no avail, any ideas?

    Hi
    In iMovie'11 (version 9.0.x)
    on top menu row - Apple/iMovie/File/Edit/Cut (Can vary dep. on language - in Swedish Apple/iMovie/Arkiv/Redigera/Klipp . . . )
    down Cut menu - Slow playback/Raspid Playback/Re-play in Slow Motion and onvards
    Here one can select the Pre-Set speeds
    Are you familiar with getting 'inspector' to run?
    No - but I guess that Double Click on clip/sequense or ctrl-Click on it might open it.
    Yours Bengt W

Maybe you are looking for

  • ERROR IN THE ITUNES STORE (-42408)

    A message 'error in the itunes store' it says cannot complete request (-42408) This has pops up repeatedly for over a week. Any thoughts/suggestions?

  • Rule to Map Accounts into Financial Statements

    Hi, Is there any rule to map the natural accounts into BI APPs Fin statement codes via group accounts? the account qualifiers in EBS say Revenue,Liability,Expense,Asset,Owners Equity. How we can map these accounts into BI Apps Fin statement codes? li

  • How to display large numbers in seperated commas?

    Hi there i just wanted to figure out how to display a large number like 1000000 into commas like 100,000 this.. cheerz

  • Costs of components and activities not incorporated in costs of FG

    Dear experts, I am setting up discrete manufacturing in a warehouse with Handling units. The process I follow: 1. Crate handling unit with COWBPACK 2. Do goods receipt with COWBHUWE 3. Consume components with COWBHUWA When looking at the financial do

  • Power Query - How to format options for Web.Content()?

    I am trying to access a web api which can return data in either JSON or XML. When connecting with Power Query I get a "400, Bad request" error though and I suspect it could be due to Power Query not explicitly providing accepted Content-Types in the