<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jeff Kelley’s Blog &#187; Mac Tips</title>
	<atom:link href="http://blog.slaunchaman.com/category/mac-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.slaunchaman.com</link>
	<description>Mac tips, iPhone applications, and the like</description>
	<lastBuildDate>Thu, 19 Aug 2010 21:14:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Using AppleScript to Automate an iChat Video Chat</title>
		<link>http://blog.slaunchaman.com/2010/03/30/using-applescript-to-automate-an-ichat-video-chat/</link>
		<comments>http://blog.slaunchaman.com/2010/03/30/using-applescript-to-automate-an-ichat-video-chat/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 16:53:09 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Mac Tips]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[iChat]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=256</guid>
		<description><![CDATA[I had to write a script to automatically start iChat at login and start a video chat with a specified screenname. I wanted to only start the chat if the user was online and available, and quit iChat on an error or if the chat ended.]]></description>
			<content:encoded><![CDATA[<p>I had to write a script to automatically start iChat at login and start a video chat with a specified screenname. I wanted to only start the chat if the user was online and available, and quit iChat on an error or if the chat ended. So here’s the script I have:</p>
<pre style="overflow:auto;"><strong>using terms from</strong> <em><span style="color: #0000ff;">application</span></em> "iChat"
	<strong>tell</strong> <em><span style="color: #0000ff;">application</span></em> "iChat"
		<strong><span style="color: #0000ff;">activate</span></strong>
		<span style="color: #0000ff;"><strong>log in</strong></span>
		<span style="color: #333399;"><strong>delay</strong></span> 5
		<strong>set</strong> <span style="color: #008000;">theBuddy</span> <strong>to</strong> <em><span style="color: #0000ff;">buddy</span></em> "ScreennameGoesHere" <strong>of</strong> <em><span style="color: #0000ff;">service</span></em> "AIM"
		<strong>try</strong>
			<strong>set</strong> <span style="color: #008000;">theStatus</span> <strong>to</strong> <span style="color: #333399;">status</span> <strong>of</strong> <span style="color: #008000;">theBuddy</span>
		<strong>on error</strong> <span style="color: #008000;">errmesg</span> <span style="color: #0000ff;">number</span> <span style="color: #008000;">errno</span>
			<strong>set</strong> <span style="color: #008000;">message</span> <strong>to</strong> <span style="color: #333399;"><strong>display dialog</strong></span> "The user is currently unavailable." <span style="color: #333399;">buttons</span> {"OK"}
			<strong><span style="color: #0000ff;">quit</span></strong>
			<strong>return</strong>
		<strong>end try</strong>
		<strong>if</strong> <span style="color: #008000;">theStatus</span> <strong>is</strong> <span style="color: #333399;">available</span> <strong>then</strong>
			<strong>set</strong> <span style="color: #008000;">theCapabilities</span> <strong>to get</strong> <span style="color: #0000ff;">capabilities</span> <strong>of</strong> <span style="color: #008000;">theBuddy</span>
			<strong>if</strong> (<span style="color: #008000;">theCapabilities</span> <strong>contains</strong> <span style="color: #333399;">multiperson video</span>) <strong>then</strong>
				<span style="color: #0000ff;"><strong>send</strong></span> "A user is attempting to contact you." <span style="color: #0000ff;">to</span> <span style="color: #008000;">theBuddy</span>
				<span style="color: #333399;"><strong>delay</strong></span> 2
				<strong>tell</strong> <span style="color: #0000ff;"><em>service</em></span> "AIM" <strong>to</strong> <span style="color: #0000ff;"><strong>make</strong></span> <span style="color: #0000ff;"><em>video chat</em></span> <span style="color: #0000ff;">with properties</span> {participants:<span style="color: #008000;">theBuddy</span>}
				<strong>set</strong> <span style="color: #008000;">theChat</span> <strong>to</strong> <span style="color: #333399;">result</span>
				<span style="color: #333399;"><strong>delay</strong></span> 30
				<strong>try</strong>
					<strong>set</strong> <span style="color: #008000;">theStatus</span> <strong>to the</strong> <span style="color: #333399;">av connection status</span> <strong>of</strong> <span style="color: #008000;">theChat</span>
				<strong>on error</strong> <span style="color: #008000;">errmesg</span> <span style="color: #0000ff;">number</span> <span style="color: #008000;">errno</span>
					<strong><span style="color: #0000ff;">quit</span></strong>
					<strong>return</strong>
				<strong>end try</strong>
				<strong>repeat while</strong> <span style="color: #008000;">theStatus</span> <strong>is not</strong> <span style="color: #333399;">ended</span>
					<span style="color: #333399;"><strong>delay</strong></span> 5
					<strong>try</strong>
						<strong>set</strong> <span style="color: #008000;">theStatus</span> <strong>to the</strong> <span style="color: #333399;">av connection status</span> <strong>of</strong> <span style="color: #008000;">theChat</span>
					<strong>on error</strong> <span style="color: #008000;">errmesg</span> <span style="color: #0000ff;">number</span> <span style="color: #008000;">errno</span>
						<strong><span style="color: #0000ff;">quit</span></strong>
						<strong>return</strong>
					<strong>end try</strong>
				<strong>end repeat</strong>
				<strong><span style="color: #0000ff;">quit</span></strong>
				<strong>return</strong>
			<strong>else</strong>
				<strong>set</strong> <span style="color: #008000;">message</span> <strong>to</strong> <span style="color: #333399;"><strong>display dialog</strong></span> "The user cannot video chat at this time. Please try again later." <span style="color: #333399;">buttons</span> {"OK"}
				<span style="color: #0000ff;"><strong>quit</strong></span>
				<strong>return</strong>
			<strong>end if</strong>
		<strong>else</strong>
			<strong>set</strong> <span style="color: #008000;">message</span> <strong>to</strong> <span style="color: #333399;"><strong>display dialog</strong></span> "The user is currently unavailable." <span style="color: #333399;">buttons</span> {"OK"}
			<strong><span style="color: #0000ff;">quit</span></strong>
			<strong>return</strong>
		<strong>end if</strong>
	<strong>end tell</strong>
<strong>end using terms from</strong></pre>
<p>A couple of gotchas:</p>
<ul>
<li>I tried using <span style="color: #333399;"><code>video chat</code></span> instead of <span style="color: #333399;"><code>multiperson video</code></span>, but that always returned false. I don’t know why.</li>
<li>Once the video chat has ended, you can’t poll its status (hence the <strong><code>try</code></strong> block).</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2010/03/30/using-applescript-to-automate-an-ichat-video-chat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Safari 3.2 Feature: Secure Website Identification</title>
		<link>http://blog.slaunchaman.com/2008/11/17/new-safari-32-feature-secure-website-identification/</link>
		<comments>http://blog.slaunchaman.com/2008/11/17/new-safari-32-feature-secure-website-identification/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 15:06:01 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Mac Tips]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[updates]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=96</guid>
		<description><![CDATA[Here’s a quick tip that]]></description>
			<content:encoded><![CDATA[<p>Here’s a quick tip that slipped through the blogosphere (at least none of the Mac blogs I subscribe to featured it): in Safari 3.2, released last week, Apple’s added a feature from Firefox 3’s “awesome bar”: when you’re on a secure website, such as a bank’s, that has identification information, it’s displayed in green (though in Safari it’s at the top-right of the title bar).  A screenshot:</p>
<p> </p>
<div id="attachment_97" class="wp-caption aligncenter" style="width: 298px"><img class="size-full wp-image-97" title="Safari 3.2 Title Bar Security" src="http://blog.slaunchaman.com/wp-content/uploads/2008/11/picture-1.png" alt="Safari 3.2 adds secure website information to the title bar." width="288" height="80" /><p class="wp-caption-text">Safari 3.2 adds secure website information to the title bar.</p></div>
<p>Along with <a href="http://www.tuaw.com/2008/11/13/apple-releases-safari-3-2-including-security-updates/">a phishing filter</a>, it looks like Safari is stepping up to the plate as a secure browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2008/11/17/new-safari-32-feature-secure-website-identification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use DVD Player in Fullscreen Mode on an External Monitor</title>
		<link>http://blog.slaunchaman.com/2008/10/23/use-dvd-player-in-fullscreen-mode-on-an-external-monitor/</link>
		<comments>http://blog.slaunchaman.com/2008/10/23/use-dvd-player-in-fullscreen-mode-on-an-external-monitor/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 19:37:04 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Mac Tips]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[DVD Player]]></category>
		<category><![CDATA[external monitors]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=91</guid>
		<description><![CDATA[By default, DVD player will]]></description>
			<content:encoded><![CDATA[<p>By default, DVD player will exit fullscreen mode when it&#8217;s not the active application.  This is a problem if you want to watch a movie on an external monitor while working on a primary monitor.  To get around it, go to Preferences in DVD Player (DVD Player -&gt; Preferences… or command + ,), switch to the “Full Screen” tab, and ensure that “Remain in full screen when DVD Player is inactive” is checked.  This should achieve the desired results.</p>
<p>Source: <a href="http://forums.macrumors.com/showthread.php?t=205513">MacRumors.com Forums</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2008/10/23/use-dvd-player-in-fullscreen-mode-on-an-external-monitor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prevent Mac OS X Leopard from Prompting You to Start Synergyd Every Time You Use SynergyKM</title>
		<link>http://blog.slaunchaman.com/2008/07/30/prevent-mac-os-x-leopard-from-prompting-you-to-start-synergyd-every-time-you-use-synergykm/</link>
		<comments>http://blog.slaunchaman.com/2008/07/30/prevent-mac-os-x-leopard-from-prompting-you-to-start-synergyd-every-time-you-use-synergykm/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 15:25:58 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Mac Tips]]></category>
		<category><![CDATA[command-line]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[Synergy]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=74</guid>
		<description><![CDATA[So here’s an annoyance.  Having]]></description>
			<content:encoded><![CDATA[<p>So here’s an annoyance.  Having just installed <a href="http://sourceforge.net/projects/synergykm">SynergyKM</a>, a great front-end for the awesome command-line utility <a href="http://synergy2.sourceforge.net/">Synergy</a>, launching it would result in the following prompt:</p>
<div id="attachment_75" class="wp-caption aligncenter" style="width: 510px"><a href="http://blog.slaunchaman.com/wp-content/uploads/2008/07/picture-3.png"><img class="size-full wp-image-75" title="Synergyd Prompt" src="http://blog.slaunchaman.com/wp-content/uploads/2008/07/picture-3.png" alt="The promt you get when launching SynergyKM" width="500" height="242" /></a><p class="wp-caption-text">The promt you get when launching SynergyKM</p></div>
<p>To fix this, you need to remove the extended attribute <em>com.apple.quarantine</em> that’s on the file.  Fire up Terminal and enter the following commands:</p>
<blockquote><p><tt>sudo xattr -d com.apple.quarantine /Library/PreferencePanes/SynergyKM.prefPane/Contents/Resources/Synergyd.app<br />
sudo xattr -d com.apple.quarantine /Library/PreferencePanes/SynergyKM.prefPane/Contents/Resources/Synergyd.app/Contents/MacOS/Synergyd</tt></p></blockquote>
<p>That will remove the flags and prevent the prompt.</p>
<p>Normally, you’d only see this prompt once, but since installing it for all users changes permissions such that your user account can’t remove the attribute, it isn’t removed.</p>
<p><strong>Note:</strong> This is assuming that you’ve installed it for all users.  If you’ve installed it for one user, it’ll be in ~/Library, not /Library.</p>
<p><strong>Update:</strong> I’ve submitted a patch to SynergyKM’s SourceForge page, so if they accept it this will no longer be an issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2008/07/30/prevent-mac-os-x-leopard-from-prompting-you-to-start-synergyd-every-time-you-use-synergykm/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Use Your MacBook Pro with an External Monitor Without Sleeping</title>
		<link>http://blog.slaunchaman.com/2008/07/10/use-your-macbook-pro-with-an-external-monitor-without-sleeping/</link>
		<comments>http://blog.slaunchaman.com/2008/07/10/use-your-macbook-pro-with-an-external-monitor-without-sleeping/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 04:16:11 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Mac Tips]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[external monitors]]></category>
		<category><![CDATA[MacBook Pro]]></category>
		<category><![CDATA[screen resolution]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=57</guid>
		<description><![CDATA[So, in a similar vein]]></description>
			<content:encoded><![CDATA[<p>So, in a similar vein as to what pushed me to write my <a href="http://blog.slaunchaman.com/2008/05/20/resize-your-windows-automatically-for-different-resolutions/">Applescript to resize windows</a>, I’ve been looking at what to do about going from using the LCD on the MacBook pro to an external monitor.  Now, everyone knows that in order to use an external display, you have to connect the display adapter while the notebook is closed, plug in an external keyboard (and your power supply), and press a button, and <em>boom</em>, you’ve got external display action at your monitor’s native resolution.  But what if you don’t want to wait the ten seconds or so it takes to go from awake to asleep?  Messing with it, I was happy to note that the following procedure seems to work:</p>
<ol>
<li>Plug in the external display, your keyboard/mouse, your power supply, etc—<em>with your notebook open</em>.  The external display will mirror your notebook’s LCD, at its resolution (if supported by the display.  If it isn’t, you’ll get the highest common denominator, I think).</li>
<li>Close your notebook cover so the display turns off.</li>
<li>Immediately open the notebook cover, then close it just as soon, then push a button on your keyboard.</li>
<li><em>Presto!</em> Your MacBook Pro should see the display and change the resolution how you want it.</li>
</ol>
<p>I’ve only tested this on my machine, so let me know in the comments if it works/doesn’t work or if you have a better way.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2008/07/10/use-your-macbook-pro-with-an-external-monitor-without-sleeping/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Updated: Resizer AppleScript</title>
		<link>http://blog.slaunchaman.com/2008/05/28/updated-resizer-applescript/</link>
		<comments>http://blog.slaunchaman.com/2008/05/28/updated-resizer-applescript/#comments</comments>
		<pubDate>Wed, 28 May 2008 21:34:09 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Mac Tips]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://slaunchaman.wordpress.com/?p=29</guid>
		<description><![CDATA[After looking at my AppleScript]]></description>
			<content:encoded><![CDATA[<p>After looking at my <a href="http://blog.slaunchaman.com/2008/05/20/resize-your-windows-automatically-for-different-resolutions/">AppleScript to resize windows</a>, I’ve decided to make a few updates.  Instead of manually doing the math for each resolution, I’ve created a new variable, <span style="color:#008000;">desired_width</span>, which is exactly what it sounds like: how wide you want your windows to be.  I’ve also made the other variable names more human-friendly: <span style="color:#008000;">_nl</span> and <span style="color:#008000;">_nr</span> are now <span style="color:#008000;">left_bound</span> and <span style="color:#008000;">right_bound</span>, respectively, for example.  After adding iTunes to my script, I noticed that it was being resized behind the menubar, so instead of setting the upper bound for all windows at 0, I’ve defined the variable <span style="color:#008000;">top_bound</span>, which defaults to 22 to account for the height of the menu bar.  If you find that this setting is incorrect (e.g. if you’ve enabled some accessibility settings that change font sizes and therefore the size of the menu bar) you may need to change it; I haven’t found a way to get the height of the menu bar in AppleScript yet—so far I’ve only found it in Java—so if anyone knows feel free to leave a comment.  Finally, after seeing <a href="http://www.j4mie.org/2008/05/26/how-to-get-the-dimensions-of-the-dock/trackback/">this post</a> by Jamie Matthews, I added some functionality to automatically set <span style="color:#008000;">bottom_bound</span> to the height of the Dock.</p>
<p>After all of these updates, the script now takes a desired width and moves applications that support AppleScript such that they range horizontally to your desired width, centered on the screen, and stretching from the bottom of the menu bar to the top of the Dock.  In the future, I’d like to make a separate application, perhaps AppleScript-based, that will allow for user customization of how the windows are arranged, allow for custom application settings, and perhaps Spaces integration.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2008/05/28/updated-resizer-applescript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Resize Your Windows Automatically for Different Resolutions</title>
		<link>http://blog.slaunchaman.com/2008/05/20/resize-your-windows-automatically-for-different-resolutions/</link>
		<comments>http://blog.slaunchaman.com/2008/05/20/resize-your-windows-automatically-for-different-resolutions/#comments</comments>
		<pubDate>Tue, 20 May 2008 22:04:27 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Mac Tips]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[convenience]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[MacBook Pro]]></category>
		<category><![CDATA[screen resolution]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://slaunchaman.wordpress.com/?p=17</guid>
		<description><![CDATA[I use my MacBook Pro]]></description>
			<content:encoded><![CDATA[<p>I use my MacBook Pro in a few different scenarios: by itself, plugged in to a 21” Apple Cinema Display, or plugged in to a 24” Dell 2405FPW.  I’m also rather OCD; I prefer my Firefox/Safari, Mail.app, and Vienna windows to be centered, stretch from the menu bar to the top of my Dock, and be a certain width.  I created a small AppleScript to auto-detect my resolution and size the windows accordingly:</p>
<pre style="overflow:scroll;">
<blockquote>

tell application "Finder"
	set screen_resolution to bounds of window of desktop
	set screen_width to item 3 of screen_resolution
	set screen_height to item 4 of screen_resolution
end tell

tell application "System Events" to tell process "Dock"
	set dock_dimensions to size in list 1
	set dock_height to item 2 of dock_dimensions
end tell

set desired_width to 1400

set side_space to screen_width - desired_width
set left_bound to (side_space / 2)
set right_bound to left_bound + desired_width
set bottom_bound to screen_height - dock_height
set top_bound to 22 (* for the menu bar *)

try
	tell application "iTunes"
		activate
		set the bounds of the first window to {left_bound, top_bound, right_bound, bottom_bound}
	end tell
end try

try
	tell application "Firefox"
		activate
		set the bounds of the first window to {left_bound, top_bound, right_bound, bottom_bound}
	end tell
end try

try
	tell application "Mail"
		activate
		set the bounds of the first window to {left_bound, top_bound, right_bound, bottom_bound}
	end tell
end try

try
	tell application "Vienna"
		activate
		set the bounds of the first window to {left_bound, top_bound, right_bound, bottom_bound}
	end tell
end try</blockquote>
</pre>
<p>With that in place, I saved it as an application in <code>~/Applications</code>, and put it in my Dock.  Now, whenever I change resolutions, I just click the button and everything is how I like it.</p>
<p>To change the script, you should be able to add any application with an AppleScript dictionary that supports moving and sizing the window.  <span style="text-decoration: line-through;">The numbers I’ve used make the windows 1,400px wide, and the height that you want will depend on the size of your Dock.</span> The script moves windows to the center, <span style="color: #008000;">desired_width</span> wide, and from the menubar to the Dock.</p>
<p><strong>Note:</strong><em> </em>I have had some trouble recently; sometimes when I change my resolution the AppleScript doesn’t pick it up.  To combat this, I told the Displays System Preferences pane to keep its icon in the menu bar; when my script uses the incorrect resolution, I change my screen resolution then change it back, which is enough for the script to detect the change.</p>
<p><strong>Update 2008-05-28:</strong> Made some usability changes.  <a href="http://blog.slaunchaman.com/2008/05/28/updated-resizer-applescript/">Details here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2008/05/20/resize-your-windows-automatically-for-different-resolutions/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
	</channel>
</rss>
