Add Multiple URLs to a Calendar Event

I frequently want to add multiple URLs to Calendar events. Of course, you can put them in the Notes section, but given that there’s a URL field, it seems a little kludgey. This solution is kludgey too, but perhaps a bit less so.

Drag the additional link(s) to the Finder to create a .webloc file; then drag that file to the attachment field for the event.

You can double-click the file to open the link, which is better than the link being non-clickable in the Notes field, where you would have to highlight and right-click (Control+click). The URL won’t appear in the body of an email when you send an event to someone, but it will be in the attached .ics file.

[crarko adds: I haven’t tested this one.]

Source: Mac OSX Hints

    

Apple Announces Q214 Profit of $10.2 Billion, Revenue of $45.6 Billion

By Alex Brooks Apple’s Quarterly Earnings until Q214
Apple today announced financial results for its second fiscal quarter of 2014 which ran from January 1, 2014 until March 29. Apple posted revenue of $45.6 billion and net quarterly profit of $10.2 billion, or $11.62 per diluted share. These results compare to revenue of $43.6 billion and net profit of $9.54 billion, or $10.09 per diluted share, in the year-ago quarter.
Gross margin was 39.3 percent compared to 37.5 percent in the year-ago quarter. International sales accounted for 66 percent of the quarter’s revenue.
Apple reported the following number of shipments for its products during the quarter:
43.7 million iPhones compared to 37.4 million in the year-ago-quarter
16.35 million iPads compared to 19.5 million in the year-ago-quarter
4.1 million Macs compared to 3.95 million in the year-ago quarter
2.76 million iPods compared to 5.63 million in the year-ago quarter.

“We’re very proud of our quarterly results, especially our strong iPhone sales and record revenue from services,” said Tim Cook, Apple’s CEO. “We’re eagerly looking forward to introducing more new products and services that only Apple could bring to market.”
“We generated $13.5 billion in cash flow from operations and returned almost $21 billion in cash to shareholders through dividends and share repurchases during the March quarter,” said Peter Oppenheimer, Apple’s CFO. “That brings cumulative payments under our capital return program to $66 billion.”
Apple provided the following guidance for its fiscal 2014 third quarter:
revenue between $36 billion and $38 billion
gross margin between 37 percent and 38 percent
operating expenses between $4.4 billion and $4.5 billion
other income/(expense) of $200 million
tax rate of 26.1%

Source: World of Apple

    

Create a Fusion Drive with a Recovery Partition

There are many step-by-step guides on the internet that explain how to add an SSD to an existing Mac, and create a ‘Fusion Drive’ that has the speed of an SSD, but also the capacity of a Hard Drive. All these guides fall short in one way that was important to me.

Creating the Fusion Drive the way these walkthroughs say (including OWC’s exceptional guides), destroys the Recovery Partition that exists on the drive. Without a Recovery Partition, you cannot enable FileVault2, and will need some other external boot drive if you ever need to perform maintenance on your internal drives. For a laptop computer that might be far from home, not having a Recovery Partition was unacceptable to me. Also note that if you buy a Mac from Apple today with Fusion Drive, it DOES come with a Recovery Partition, so it is indeed possible to do.

It turns out that Apple’s Core Storage technology is more flexible than these walkthroughs give on. You can enroll an individual partition of a …

Source: Mac OSX Hints

    

Using Time Machine on unsupported volumes

I wanted to use Time Machine on my exFAT hard drive, but turns out that these volumes aren’t supported from Time Machine! There is a very simple way to use Time Machines on unsupported hard drives, as long as you follow these instructions carefully you shouldn’t have any issues at all.

First, connect the unsupported volume (in this case, an exFAT external hard drive.) When it mounts, open the Terminal and type these commands, substituting ‘My External HDD Name’ for the name of the unsupported volume.

cd /Volumes
cd ‘My External HDD Name’

Next, type this code, substituting for your needs:

hdiutil create -size 320g -type SPARSEBUNDLE -fs “HFS+J” MacBook-Backup.sparsebundle
open MacBook-Backup.sparsebundle

Here, a 320GB sparse bundle named ‘MacBook-Backup’ is being made and mounted. You can change these values as you see fit. From herein, I’ll refer to the sparse bundle name as ‘MacBook-Backup’.

Source: Mac OSX Hints

    

10.8: AppleScript to close iCal Alerts

I’d just installed OS X 10.8, and booted to find the right side of my screen covered in Birthday and Calendar notifications! Since installing I’ve clicked ‘Close’ on way too many iCal notification alerts.

Here’s a script to close them all for you in one fell swoop. Since I still want iCal to popup a Notification alert for event alarms I’ve set, I don’t want to simply disable all the iCal notifications (or set them to temporary banner alerts).

However, it still occurs that sometimes a small pile of alerts have accrued while I was away from the computer, and I really hate hitting ‘Close’ a bunch of times.

So, followng is a script to simply close all the piled-up Notification Alerts. The script was put together using these two webpages for inspiration: http://macosxautomation.com/mavericks/notifications/01A.html (most of the nice code comes from here) and …

Source: Mac OSX Hints

    

Create very unique signatures in Preview

You can make signatures in Preview that are pen and ink style drawings.

I don’t know if this has been posted yet, or if it is generally known, but I stumbled upon a neat feature of signatures in Preview.app. When you create a signature, if you you don’t hold up a piece of paper with a signature on it, and simply smile for a mug shot, Preview will create a signature that is a neat pen and ink style image of yourself, or whatever is in front of the camera. I’ve created several, that for the right client, can be used as a humorous alternative to an actual signature. I also used a screen capture of the signature on a document and made the image into a Facebook Profile picture.

[crarko adds: Well I didn’t know about it. Most folks use Photo Booth to do things like this, I’d guess, but I always appreciate a creative use of a program.]

Source: Mac OSX Hints

    

Custom margins in TextEdit

There is already an old hint about this topic, but it doesn’t really explain it very clearly, only in the comments.

Here’s how you can change the margins in TextEdit to your favourite size, so that you can use, for example, the whole space on a sheet of paper when printing.

First, save your document first as a Rich Text file (.rtf), if you have not already done this. To see the effect directly in your document, open it and enable under the Format menu the setting Wrap to Page for your document.

Next open up the TextEdit preferences, switch to the tab Open and Save and check on the option Display RTF files as RTF code instead of formatted text.

Open the document again and you will see the raw code that defines how the document look like. You want to look in the 4th row, where it says:
margl1440margr1440

This define …

Source: Mac OSX Hints

    

Automatically create Calendar events when receiving email

By Matt Swain I’m always looking for ways to automate the most repetitive tasks I find myself doing on my Mac. The other day, I realised that I spend a lot of time manually creating Calendar events by copying information from booking confirmation emails. This is exactly the sort of task that can be easily automated to save you a little bit of time and effort every day.

Here’s how you can set up a custom rule in Mail app that runs a short AppleScript to create a new event in Calendar app.

To illustrate how to do this, I’m going to use an example that I’ve set up for myself. I regularly receive booking confirmation emails from my local cinema that look like this:

All the information to create a Calendar event is there in the text, but it is annoyingly time consuming to do this manually. Let’s set up a Rule to process these emails automatically.

In Mail app, choose Preferences from the Mail menu, and click on the Rules tab. Create a new rule, and adjust the drop down menus to look like the screenshot below. The first section shows the conditions required to apply the rule to a message. In my case, I restrict the rule to only messages from “noreply@cineworldmail.com” in my “iCloud” account. When an email that meets these criteria is received, a series of actions are performed. First the message is moved out of my inbox into another mailbox, and it is marked as read.

The final action is the most complicated. It is a custom AppleScript that reads the email, figures out the name, date, time and location, then creates a Calendar event.

When you first choose Run AppleScript from the drop down menu, there will not be any AppleScripts available for you to run. First we have to create one.

To do this, open up AppleScript Editor. This is located in the Utilities folder in the Applications folder, or you can find it using Spotlight search or Launchpad. In the script window that appears, paste the following script:

— Triggered by Mail rule.
using terms from application “Mail”
on perform mail action with messages msgs for rule theRule
tell application “Mail”
repeat with msg in msgs
try
set msgcontent to content of msg
set msgid to message id of msg
set {movie, runtime, cert, bref, starttime, addr, screen} to my parseMsg(msgcontent)
my createEvent(movie, runtime, cert, bref, starttime, addr, screen, msgid)
end try
end repeat
end tell
end perform mail action with messages
end using terms from

This is the general format of all Mail rule AppleScripts. One of the benefits of AppleScript is that it is very close to normal English language, and you can get some idea of what a script does even if you aren’t familiar with AppleScript. The above script takes each email message that the rule matched, and runs a function called parseMsg on it to extract the event details. Then it runs a function called createEvent using those details.

Next, below this paste the following functions:

— Parse the email content to extract movie details.
on parseMsg(msgcontent)
set movie to extractBetween(msgcontent, “You are going to see: “, “Cert: “)
set cert to extractBetween(msgcontent, “Cert: “, “Running Time: “)
set runtime to extractBetween(msgcontent, “Running Time: “, ” minutes”)
set bref to extractBetween(msgcontent, “Booking Reference: “, “Date: “)
set datestring to extractBetween(msgcontent, “Date: “, “Cinema: “)
set addr to extractBetween(msgcontent, “Cinema: “, “Screen: “)
set screen to extractBetween(msgcontent, “Screen: “, “Number of people going: “)
set starttime to parseDateString(datestring)
return {movie, runtime, cert, bref, starttime, addr, screen}
end parseMsg

— Extract the substring from between two strings
to extractBetween(theString, startText, endText)
set tid to AppleScript’s text item delimiters
set AppleScript’s text item delimiters to startText
set startComps to text items of theString
set AppleScript’s text item delimiters to endText
set endComps to text items of second item of startComps
set AppleScript’s text item delimiters to tid
return trim(first item of endComps)
end extractBetween

— Trim all whitespace from start and end of a string
on trim(theString)
set theChars to {” “, tab, character id 10, return, character id 0, character id 8232}
repeat until first character of theString is not in theChars
set theString to text 2 thru -1 of theString
end repeat
repeat until last character of theString is not in theChars
set theString to text 1 thru -2 of theString
end repeat
return theString
end trim

— Parse date and time from the string given in the email.
on parseDateString(datestring)
set theDate to current date
set dateWords to words of datestring
set day of theDate to text 1 thru -3 of item 2 of dateWords
set time of theDate to (item 5 of dateWords) * hours + (item 6 of dateWords) * minutes
set monthList to {January, February, March, April, May, June, July, August, September, October, November, December}
repeat with i from 1 to 12
if item 3 of dateWords = ((item i of monthList) as string) then
set monthNumber to (text -2 thru -1 of (“0” & i))
exit repeat
end if
end repeat
set month of theDate to monthNumber
return theDate
end parseDateString

This is the core of the AppleScript, which parses the email to extract the event details. The way it works is to extract the text between two other pieces of text. For example, it extracts the text between You are going to see: and Cert: and sets it as the name of the movie. You will need to modify this to match the exact format of your email. A bit of trial and error may be necessary, so you may want to test the rule on emails you send to yourself.

Finally, paste the following function that creates the Calendar event:

— Create a calendar event for the specified movie.
on createEvent(movie, runtime, cert, bref, starttime, addr, screen, msgid)
set endtime to starttime + runtime * minutes
tell application “Calendar” to tell calendar “Home”
set theEvent to make new event with properties {start date:starttime, end date:endtime, summary:”Cinema: ” & movie}
set location of theEvent to screen & “, Cineword ” & addr
set description of theEvent to “Booking Reference: ” & bref & return & “Run Time: ” & runtime & ” minutes” & return & “Certificate: ” & cert
set url of theEvent to “message://” & “%3c” & msgid & “%3e”
end tell
end createEvent

You will also need to modify this to match the exact details in your email messages. Above, I set the name of the even to the title of the movie and I calculate the end time by adding the running time of the movie to the start time. I set the location of the event to the screen number and the cinema address, and I add a few details to the event notes like my booking reference number. Setting the url of the event to the email message id also provides a handy link back to the original email message from within Calendar.

You can find the full script here.

Now all we need to do is save the AppleScript somewhere Mail can see it. Choose Save from the File menu, and then press Command-Shift-G to bring up the Go to folder dialog. In the text field, type ~/Library/Application Scripts/com.apple.mail and press Return. Give the script a memorable name and save it. Now, when you return to Mail, your script should be available in the drop down menu next to “Run AppleScript”.

Source: Mac OSX Tips

    

Low-power mode for Maps.app

It’s possible to save power when using Maps to navigate in a car. It’s an obvious trick once you know about it, and easy too.

When you’re navigating with the Maps app, you’re probably used to it chewing through battery life. Even on a full charge my iPhone 5 doesn’t last more than 2-3 hours when navigating.

To eke out extra life, just press the Sleep button (top of the phone), once you’re on your way and are on a long stretch before the next turn/navigation point (i.e. on a freeway for 50 miles). The screen will blank, but the navigation will continue. The phone will briefly wake 10 miles from your next turn/navigation point, to tell you about it, and will wake 2 miles from it and stay awake until you get past it.

To switch back to non-power-saving mode, just swipe as usual to wake the phone.

To be honest this doesn’t save a huge amount of battery life in my tests, but it’s better than nothing. For long journeys,you really need a USB power sour …

Source: Mac OSX Hints

    

Hiding Software Updates

Since the introduction of Lion the system’s Software Opdate mechanism has been integrated into App Store.app and the Software Update Preference Pane has been removed and substituted with “App Store”.

If you constantly are being reminded to install software updates you don’t really want to install, you can right-click (Control+click) the name of the update and hide it, eliminating the reminder.

[crarko adds: I think this is probably known already to many of you, but if it’s not it can be a handy trick. I find the whole App Store method for Software Update a lot less pleasant than the old Snow Leopard mechanism where it was separate, but maybe I’m just old fashioned.]

Source: Mac OSX Hints

    

Just another Mac Tips site