<?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>Leaf Raker &#187; Apple Script</title>
	<atom:link href="http://leafraker.com/category/apple-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://leafraker.com</link>
	<description>Personal Productivity and Mac OS X</description>
	<lastBuildDate>Tue, 22 Nov 2011 13:08:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Mute system volume with Apple Script and Quicksilver</title>
		<link>http://leafraker.com/2007/11/13/mute-system-volume-with-apple-script-and-quicksilver/</link>
		<comments>http://leafraker.com/2007/11/13/mute-system-volume-with-apple-script-and-quicksilver/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 19:04:34 +0000</pubDate>
		<dc:creator>Koinseb</dc:creator>
				<category><![CDATA[Apple Script]]></category>
		<category><![CDATA[Quicksilver]]></category>

		<guid isPermaLink="false">http://leafraker.com/2007/11/13/mute-system-volume-with-apple-script-and-quicksilver/</guid>
		<description><![CDATA[Quicksilver&#8217;s iTunes plugin comes with several excellent scripts, one of them is to mute iTunes. The only problem is, that you can still hear all the system sounds. Pretty annoying if you are in a meeting or sitting in a class. My workaround was to write an Apple Script to control the system volume: set [...]]]></description>
			<content:encoded><![CDATA[<p>Quicksilver&#8217;s iTunes plugin comes with several excellent scripts, one of them is to mute iTunes.</p>
<p>The only problem is, that you can still hear all the system sounds. Pretty annoying if you are in a meeting or sitting in a class.</p>
<p>My workaround was to write an Apple Script to control the system volume:</p>
<table class="codetable">
<tr>
<td>set curVol to (get (output volume of (get volume settings)))<br />
if curVol &gt; 0 then<br />
&nbsp;&nbsp;set volume output volume 0<br />
else<br />
&nbsp;&nbsp;set volume output volume 50<br />
end if</td>
</tr>
</table>
<p>This script will mute the system volume, or set it back to 50% if it&#8217;s already muted (the value for &#8220;<em>set volume</em>&#8221; is a percentage value from 0 to 100).</p>
<p>That&#8217;s it, I created a keyboard trigger to execute this script (I used Shift-Ctrl-Command + M) and I can mute my system without having to use the mouse or trackpad.</p>
]]></content:encoded>
			<wfw:commentRss>http://leafraker.com/2007/11/13/mute-system-volume-with-apple-script-and-quicksilver/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to use a Microsoft keyboard with your Mac</title>
		<link>http://leafraker.com/2007/10/04/how-to-use-a-microsoft-keyboard-with-your-mac/</link>
		<comments>http://leafraker.com/2007/10/04/how-to-use-a-microsoft-keyboard-with-your-mac/#comments</comments>
		<pubDate>Thu, 04 Oct 2007 20:27:35 +0000</pubDate>
		<dc:creator>Koinseb</dc:creator>
				<category><![CDATA[Apple Script]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Personal Productivity]]></category>
		<category><![CDATA[Quicksilver]]></category>

		<guid isPermaLink="false">http://leafraker.com/2007/10/04/how-to-use-a-microsoft-keyboard-with-your-mac/</guid>
		<description><![CDATA[Using a Microsoft keyboard with a MacBook is possible but has one major drawback: The &#8220;Option&#8221; and &#8220;Command&#8221;-keys are exchanged and called &#8220;Windows&#8221; and &#8220;Alt&#8221;-keys. Fortunately swapping the keys so that the &#8220;Command&#8221; and &#8220;Option&#8221;-keys are in the same location like on an Apple keyboard is very simple: Open your &#8220;System Preferences&#8221; Select &#8220;Keyboard &#38; [...]]]></description>
			<content:encoded><![CDATA[<p>Using a Microsoft keyboard with a MacBook is possible but has one major drawback: The &#8220;Option&#8221; and &#8220;Command&#8221;-keys are exchanged and called &#8220;Windows&#8221; and &#8220;Alt&#8221;-keys.</p>
<p>Fortunately swapping the keys so that the &#8220;Command&#8221; and &#8220;Option&#8221;-keys are in the same location like on an Apple keyboard is very simple:</p>
<ol>
<li>Open your &#8220;System Preferences&#8221;</li>
<li>Select &#8220;Keyboard &amp; Mouse&#8221;</li>
<li>Select the &#8220;Keyboard&#8221;-tab</li>
<li>Click on &#8220;Modifier Keys&#8230;&#8221;</li>
</ol>
<p>In the resulting dialog map the Option Key to &#8220;Command&#8221; and vice versa. This is a screenshot made with Tiger, the dialog in Leopard looks a little bit different:</p>
<p style="text-align: center"><img src="http://leafraker.com/wp-content/uploads/2007/10/keymapsettings.png" alt="Key Mappings" /></p>
<p>Voila &#8211; that&#8217;s it. Now the Microsoft keyboard should behave just like an Apple keyboard.</p>
<p><strong>Now, for one additional problem (if you are still using Tiger or before):</strong></p>
<p>I am using my MacBook Pro in my office, so I&#8217;m frequently connecting and disconnecting my keyboard. Since my external keyboard is an ergonomic keyboard with Microsoft keys I would have to change those settings each and every time I connect or disconnect the keyboard. This is only the case if you&#8217;re still using Tiger or before, because in Leopard you can set the keys for each keyboard type as shown in this screenshot: <a href="http://leafraker.com/2007/10/04/how-to-use-a-microsoft-keyboard-with-your-mac/keyboard-settings-in-leopard/" rel="attachment wp-att-25" title="Keyboard settings in Leopard">Keyboard settings in Leopard</a></p>
<p>One solution is an AppleScript, which I found on the following website:</p>
<p><a href="http://fall-line.com/2007/07/02/change-keyboard-modifier-keys-automatically-on-osx-with-applescript">Change keyboard modifier keys automatically on OSX with Applescript </a></p>
<p>Now I have a Quicksilver Trigger to execute this Applescript, which makes the swapping of the &#8220;Command&#8221; and &#8220;Option&#8221;-keys quick and painless!</p>
]]></content:encoded>
			<wfw:commentRss>http://leafraker.com/2007/10/04/how-to-use-a-microsoft-keyboard-with-your-mac/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Use Quicksilver to toggle Nocturne</title>
		<link>http://leafraker.com/2007/09/14/use-quicksilver-to-toggle-nocturne/</link>
		<comments>http://leafraker.com/2007/09/14/use-quicksilver-to-toggle-nocturne/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 17:12:47 +0000</pubDate>
		<dc:creator>Koinseb</dc:creator>
				<category><![CDATA[Apple Script]]></category>
		<category><![CDATA[Personal Productivity]]></category>
		<category><![CDATA[Quicksilver]]></category>

		<guid isPermaLink="false">http://leafraker.com/2007/09/14/use-quicksilver-to-toggle-nocturne/</guid>
		<description><![CDATA[Nocturne, a nifty little application from the creator of Quicksilver, let&#8217;s you switch the display of your Mac into night vision mode: This &#8220;night vision mode&#8221; is more than just a toy &#8211; there are situations when it comes in very handy! I like to use it in meetings and presentations where the light in [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify; "><a href="http://docs.blacktree.com/nocturne/nocturne">Nocturne</a>, a nifty little application from the creator of Quicksilver, let&#8217;s you switch the display of your Mac into night vision mode:</p>
<p style="text-align: justify; ">This &#8220;night vision mode&#8221; is more than just a toy &#8211; there are situations when it comes in very handy! I like to use it in meetings and presentations where the light in the room are dimmed down. In those situations, the &#8220;night vision display&#8221; makes the display more comfortable for my eyes and reduces the annoyance of the bright laptop display for other people in the room.</p>
<p style="text-align: justify; ">The only drawback to Nocturne is that (to my knowledge) it doesn&#8217;t have an easy way to toggle between night vision and normal display with Quicksilver &#8211; so here is my solution:</p>
<p style="text-align: justify; ">Once Nocturne is set to &#8220;night vision&#8221; it will remember this setting and switch the display immediately when invoked. So all I needed was an application that would start Nocturne if it&#8217;s not running and quit Nocturne otherwise. A short apple script does this job for me:</p>
<table class="codetable">
<tr>
<td>
tell application &#8220;System Events&#8221;<br />
&nbsp;&nbsp;if exists process &#8220;Nocturne&#8221; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;try<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;quit application &#8220;Nocturne&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;end try<br />
&nbsp;&nbsp;else<br />
&nbsp;&nbsp;&nbsp;&nbsp;try<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;open application &#8220;Nocturne&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;end try<br />
&nbsp;&nbsp;end if<br />
end tell
</td>
</tr>
</table>
<p style="text-align: justify; ">You can download this script here: <a href='http://leafraker.com/wp-content/uploads/2007/09/togglenocturne.txt' title='toggleNocturne'>toggleNocturne</a></p>
<p style="text-align: justify; ">That&#8217;s it. Save this script as an application and define a keyboard trigger in Quicksilver (I used <i>Shift-Control-Command-N</i>) to invoke it.</p>
]]></content:encoded>
			<wfw:commentRss>http://leafraker.com/2007/09/14/use-quicksilver-to-toggle-nocturne/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

