You can use an AppleScript to send a notification to Growl whenever new messages arrive in Mail.app. The script also includes the image of the sender from your Address Book as the icon of the Growl notification. Works in Snow Leopard and Lion.
I adapted a script written originally by Hunter Ford. I added the ability to include the image of the sender from the Address Book (if it exists). Britney F. helped me solve a couple of bugs -- Many thanks!
First you have to be using Mail.app and the latest version of Growl.
You can download the script from here and place in your /Library/Scripts folder or anywhere you wish.
To use this script, you have to add a rule in Mail.app to run the script for all new messages.
In Mail.app choose Preferences » Rules » Add New Rule. Then set the condition to 'Every Message' and the action to 'Run AppleScript' then choose the Mail2Growl.scpt from the folder you saved it in.
Whenever you get a new message, a Growl notification will appear with the image of the sender or a placeholder image if you do not have his/her image in your Address Book.
Here's the script (save it as Mail2Growl.scpt):
-- Mail2Growl
-- Growl Alerts in Mail
-- Wassim Jabi [http://wjabi.net]
-- Modified from the excellent script by Hunter Ford [http://www.cupcakewithsprinkles.com]
-- If it exists, this script sends the photo of the sender to Growl from the address book. Otherwise, it sends the sender place holder image from Mail.app.
-- Original script found at [http://hunterford.me/growl-notifications-for-apple-mail-on-mac-os-x/]
-- This script uses a tip to summarise many messages by "Ryan" in the comments section at [http://hunterford.me/growl-notifications-for-apple-mail-on-mac-os-x/]
-- This script also used tips from [http://www.macosxtips.co.uk] for finding photos in the Address Book
-- This script arises from the lack of any Growl Support in Mac OS X Snow Leopard (10.6) or Lion (10.7)
-- Code inspired by and adapted from James Higgs [http://blog.jameshiggs.com/2009/08/28/growlmail-on-snow-leopard-a-temporary-fix/] as well as those mentioned.
tell application "GrowlHelperApp"
-- Make a list of all the notification types
-- that this script will ever send:
set the allNotificationsList to {"New Email"}
-- Make a list of the notifications
-- that will be enabled by default.
-- Those not enabled by default can be enabled later
-- in the 'Applications' tab of the growl prefpane.
set the enabledNotificationsList to {"New Email"}
-- Register our script with growl.
-- You can optionally (as here) set a default icon
-- for this script's notifications.
register as application "Mail" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "Mail"
end tell
-- Mail Rule Trigger
--
-- Source: Benjamin S. Waldie [http://www.mactech.com/articles/mactech/Vol.21/21.09/ScriptingMail/index.html]
using terms from application "Mail"
on perform mail action with messages theSelectedMessages for rule theRule
set N to count items of theSelectedMessages
if (N > 5) then
set multipleDescription to "" & N & " new messages"
tell application "GrowlHelperApp"
notify with name "New Email" title "You have " & N & " new messages." description " " application name "Mail"
end tell
else
repeat with thisMessage in theSelectedMessages
-- Process the current message
-- Grab the subject and sender of the message
set growlSender to my ExtractName(sender of thisMessage)
try
set growlPhoto to my getPhotoFromAddressBook(my ExtractEmailAddress(sender of thisMessage))
on error
set growlPhoto to read POSIX file "/Applications/Mail.app/Contents/Resources/SenderImagePlaceholder.png" as "TIFF"
end try
set growlSubject to subject of thisMessage
set growlTitle to growlSender & return & growlSubject
-- Use the first 100 characters of a message
set growlDescription to (content of thisMessage)
set growlLength to (length of growlDescription)
if growlLength > 100 then
set growlDescription to "" & (characters 1 through 100 of growlDescription) & " …"
end if
-- Send a Notification
tell application "GrowlHelperApp"
try
notify with name "New Email" title growlTitle description growlDescription application name "Mail" image growlPhoto
on error
set growlPhoto to (read POSIX file "/Applications/Mail.app/Contents/Resources/SenderImagePlaceholder.png" as "TIFF")
notify with name "New Email" title growlTitle description growlDescription application name "Mail" image growlPhoto
end try
end tell
end repeat
end if
end perform mail action with messages
end using terms from
-- *ExtractName*
--
-- gathers the name portion from the "From: " line
--
-- Source: robJ [http://forums.macosxhints.com/archive/index.php/t-19954.html]
to ExtractName(sender_)
if sender_ begins with "<" then
return text 2 thru -2 of sender_
else
set oldTIDs to text item delimiters
try
set text item delimiters to "<"
set name_ to first text item of sender_
set text item delimiters to oldTIDs
on error
set text item delimiters to oldTIDs
end try
return name_ as string
end if
end ExtractName
-- *ExtractEmailAddress*
--
-- gathers the email address portion from the "From: " line
--
-- Source: robJ [http://forums.macosxhints.com/archive/index.php/t-19954.html]
to ExtractEmailAddress(sender_)
if sender_ begins with "<" then
return text 2 thru -2 of sender_
else
set oldTIDs to text item delimiters
try
set text item delimiters to {"<", ">"}
set email_ to second text item of sender_
set text item delimiters to oldTIDs
on error
set text item delimiters to oldTIDs
end try
return email_ as string
end if
end ExtractEmailAddress
to getPhotoFromAddressBook(sender_)
set photo_ to read POSIX file "/Applications/Mail.app/Contents/Resources/SenderImagePlaceholder.png" as "TIFF"
try
tell application "Address Book"
set photo_ to image of people whose value of emails contains sender_
end tell
on error
set photo_ to read POSIX file "/Applications/Mail.app/Contents/Resources/SenderImagePlaceholder.png" as "TIFF"
end try
return photo_
end getPhotoFromAddressBook
[crarko adds: Tested briefly, seemed to work OK in 10.6.8. It looks like the most recent version of Growl (for Lion) is in the Mac App Store for US $1.99. The option to build it from source is still available as well.]
This hint describes how to easily see all the emails in one conversation without having to open them and scroll through.
If you have your emails 'organized by conversation' you will see in the email list in the left column the number of emails in that conversation. You can just click on the email showing in the left-hand column and hit the Right arrow key. This causes all the emails in that conversation be shown in a drop-down list by date, one on each line, below the latest one. To undo the list, press the Left arrow key.
[crarko adds: This is one of those obvious shortcuts that can hide forever if not mentioned.]
Every now and then I poke around the web to see if someone has found a way to search InDesign files with Spotlight. For many users of InDesign, this missing capability has been a point of frustration since Spotlight was introduced with Tiger back in April of 2005. Now there's a little something for anyone running InDesign CS5 or CS5.5.
Over in the Adobe forums, John Hawkinson put together a plugin. He recommends installing it, then using Terminal to re-index specific files or folders using:
mdimport /Users/UserName/Path/To/File/Or/Folder
I installed the latest version of his plugin (version 0.1c) into ~/Library/Spotlight then ran the mdimport command on my Documents folder. While he's explicit that this is alpha software, I've seen no issues and it seems to work very well. Thanks, John!
[crarko adds: A big help for a fairly significant omission. Good find.]
There's a recent Macworld article for quickly making Stickies. I thought that some folks might want to make Sticky Widgets instead.
This is derived from my hint posted a few years ago.
Depending on your system version (and possibly other factors), you may need to launch Dashboard at least once if you haven't since system startup before trying the Service.
Here are the simple steps:
Open Automator and create an empty Mac OS X Service document. In the document window set the first popup to text and the second pop-up to any application.
Drag a Run AppleScript action into the right side of the Automator document window. Then paste the following line into the Run AppleScript step just beneath the (* Your script goes here *) line:
activate
set inputText to (input as text)
do shell script "open /Library/Widgets/Stickies.wdgt"
delay 0.2
tell application "System Events"
keystroke tab
keystroke tab
keystroke inputText
end tell
Save the Service document as 'Sticky Widget from selected text,' then open the Keyboard prefpane.
In the Keyboard Shortcuts segment tab, click Services, and put Command+Ctrl+Shift+S into the shortcut area for the Sticky Widget from selected text entry in the list. Close the prefpane (the keyboard trigger is just a suggestion - you can use others, just be sure to test, because whether a shortcut works or not can be affected by lots of things).
[crarko adds: I tested this (without the shortcut), and it works as described.]
Under Lion, the screen saver authentication dialog box does not allow you to enter a username. So even if you've made the changes detailed in this Snow Leopard hint there is no way to put in alternate credentials to unlock a user's screen.
First, edit /etc/pam.d/screensaver as per the original Snow Leopard hint:
Open /Applications/Utilities/Terminal.app
Type cd /etc/pam.d
3. sudo cp screensaver screensaver.bak
4. sudo nano screensaver
5. Find the line: account required pam_group.so no_warn group=admin,wheel fail_safe
and change it to: account sufficient pam_group.so no_warn group=admin,wheel fail_safe
Press Control+X to save /etc/pam.d/screensaver and exit nano.
Then, still in Terminal, we make a wholly unintuitive change to /etc/authorization:
cd /etc
sudo cp authorization authorization.bak
sudo nano authorization
Press Control+W and search for unlock the screensaver
Change the line: <string>The owner or any administrator can unlock the screensaver.</string>
to: <string> (Use SecurityAgent.) The owner or any administrator can unlock the screensaver.</string>
Press Control+X to save /etc/authorization and exit nano.
Reboot the Mac
[crarko adds: I haven't tested this one, but the original Snow Leopard hint was good. Be sure to make the file backups before doing any editing, and if it were me, I'd want to do this on a test machine (with a full system backup) before deploying it. If you try this and find any errors/omissions please post them in the comments, and I'll correct the hint.
Note: Changed references to /etc/authentication to the correct file /etc/authorization and other cleanup.]
Word 2011's built-in fullscreen mode leaves a lot to be desired. Microsoft says they're updating the program to use Lion's fullscreen mode, but until then, here's a way to hide all the interface elements so you can use the whole screen.
After you put Word into its own Space, the first thing to do is hide the menu bar using this tip here.
First I made a backup copy of Microsoft Word.app. Then I showed package contents on the original and opened the Info.plist that's in the Contents folder. It opened up in Lion's Property List Editor. I hit the 'Add Child' button and typed in LSUIPresentationMode and hit return: it automatically changed to Application UI Presentation Mode. I typed 4 in the Value field, and it automatically changed to All Suppressed. I saved the plist in place. That copy of Word now auto-hides the menu bar (mouse to the top of the screen to show it).
The next step was hiding everything manually in Word. I turned off the ribbon and the toolbars. I put the ruler on AutoHide. In the Window section of the View section of Preferences I unchecked all the boxes and checked the 'Wrap to window' box.
At this point the only thing left onscreen is the window's titlebar. Some Visual Basic can hide that by pushing it up above the screen's top edge. I added this macro to the Normal template using the Visual Basic Editor, then assigned it to a command key sequence using Customize Toolbars and Menus and clicking on the Keyboard... button.
Sub TrueFullscreen()
With ActiveDocument.ActiveWindow
.Top = -23
.Left = 0
.Height = (Application.UsableHeight + 23)
.Width = (Application.UsableWidth)
End With
End Sub
Now running that macro on an open document makes it take up the full screen. Setting your view mode to Draft or Web Layout will let you use the whole width of the screen for text, with the 'Wrap to window' option I mentioned above. I currently have a document that I'm adding a lot of comments to, and I prefer the balloons interface to the sidebar interface, so I'm using Web Layout.
To show your title bar again, just pick 'Arrange All' from the Window menu.
[crarko adds: I haven't tested this one. Do be sure to make the backup before tinkering with the property list file.]
Are you running another OS with the great and free VirtualBox virtualization application by Oracle? Are you also using TimeMachine? Chances are that you are excessively using Time Machine and filling your Backup disk with slightly different but still huge disk images. Here's a possible solution to this problem:
VirtualBox provides the possibility to create snapshots. This allows you to go back to a virtual machine state when you are not happy with your virtual machine anymore. Possible examples are: you messed up your system or you caught a virus in your virtual machine.
This feature can also be used for circumventing the problem mentioned above, namely the excessive Time Machine usage.
Bring your virtual machine to a state you like
Create a snapshot in VirtualBox
Exclude the snapshot directory from TimeMachine Backup (it is located in /Users/YOURUSERNAME/Library/VirtualBox/Machines/VIRTUALBOXNAME/Snapshots, change YOURUSERNAME and VIRTUALBOXNAME accordingly)
Using that trick, the original disk image will be backed up, while the changes you make everyday will not.
Side effects:
Your changes are never backed up, so in case of disk failure, you lose them.
If you make changes that are important, you might want to merge the current state from time to time and create a new "safe" snapshot.
[crarko adds: I haven't used VirtualBox for quite a while, but this should be handy for those of you who do.]
You can search the iTunes list of radio stations if you add them to a playlist that you created.
If you click the built-in Radio list in your iTunes Library, you can see lots of internet audio streaming radio stations, apparently chosen by Apple, organized by genre; but you can't search the list. The iTunes search field in the top right corner is grayed-out.
If you make a new playlist, and drag radio stations into it, you can search in that playlist.
I wanted to search for any radio stations that might play, for example, 'dubstep' or 'Hindi' or 'reggaeton.'
I made a new playlist and dragged radio stations into it. I tried dragging all of them, but iTunes gave up after 999 stations. I also see that iTunes won't retrieve station names now, but that may be because I tried dragging them all (that would be at least 1500 stations). Maybe my network's sysop shut that off. Anyway, I'll try again tomorrow, but the point of the hint is that you can use the Search feature if the radio stations are in a playlist.
Also, note that you probably should select all stations and uncheck them, because if iTunes is set to Shuffle mode and it chooses a radio station, it'll stop shuffling because an audio stream never comes to a stop.
[crarko adds: I remember putting radio stations into playlists long ago when I use iTunes Radio; never tried to search them though.]
While viewing my purchased apps in the Mac application of 'App Store' I clicked the (X) next to the iPhoto Installed button. iPhoto immediately disappeared from the list of purchased apps.
There is no Undo for this nor any other obvious or searched solution. Here is how to restore the listing of purchased apps. It is not obvious.
Delete an app if you haven't. Under the App Store menu item Store drag down to View My Account.
Enter your password and a new option is available in the account window listing Hidden Purchases with an option to unhide them.
You do not see this option unless you have deleted at least one list item. This provides a way of filtering out rejected apps you have purchased.
[crarko adds: I tested this (in 10.6.8), and it works as described. At least with the iTunes App Store, there is a warning dialog and some instruction when clicking on the X to hide an app as mentioned in this hint.]