Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Add an iPhone call log to iCal via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Add an iPhone call log to iCal via AppleScript
Authored by: Supp0rtLinux on Aug 26, '08 12:14:05PM
The correct code to have it show minutes instead of seconds is:
newEvent.setNotes("Length of call: " + (call.duration/60).to_s + " minutes")
Of course, this means that for 1 minute phone calls, it will say "1 minutes". So, perhaps a Ruby expert could add the logic for an if/then statement to say basically if less than or equal to 1 then "minute", else if greater than 1, then minutes. I could do this in a shell script or perl, but my Ruby skills are sub-par.

Also note that the file in /usr/local/bin is likely restricted. You will need to do something like

sudo vi /usr/local/bin/calllog2ical.rb
to be able to edit it properly.

[ Reply to This | # ]
Add an iPhone call log to iCal via AppleScript
Authored by: jedmtnman on Aug 26, '08 02:01:56PM

i had replied to this but it was buried in the thread. Thanks for adding the bit about the sudo. I expected most folks to edit with bbedit, etc and to "save as admin"

jed



[ Reply to This | # ]