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


Click here to return to the 'Script improvement and Tiger tip' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Script improvement and Tiger tip
Authored by: ryancu on Oct 09, '05 04:32:12AM
This script does not work properly if you have more than one Mail viewer window open. It effects the oldest viewer instead of the frontmost. Here is an improved version which always works on the frontmost window:

tell application "Mail"
	repeat with thisViewer in (every message viewer)
		if (window of thisViewer) is window 0 then exit repeat
	end repeat
	tell thisViewer
		if preview pane is visible then
			set preview pane is visible to false
		else
			set preview pane is visible to true
		end if
	end tell
end tell
Also, people looking for a way to run scripts using the keyboard in Tiger can configure the free QuickSilver to do so. Remember to only make the keyboard trigger work when Mail is active.

[ Reply to This | # ]
Script improvement and Tiger tip
Authored by: slswift on Jul 15, '09 08:39:03AM

Thanks! Here it is nearly 4 years later, I'm using Leapord, and this trick works perfectly!

Really, thanks again. I have always wanted a way to toggle the preview pane. It just took me a long time to google for it. This was one of the first hits, and a great bit of AppleScript.

Spencer



[ Reply to This | # ]