<?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>GFMorris.org &#187; Geof F. Morris</title>
	<atom:link href="http://gfmorris.org/archives/author/geof-f-morris/feed/" rel="self" type="application/rss+xml" />
	<link>http://gfmorris.org</link>
	<description>Smart Guy, Dumb Code</description>
	<lastBuildDate>Sat, 17 Jul 2010 15:39:22 +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>Running WordPress 3.0</title>
		<link>http://gfmorris.org/archives/2010/06/17/running-wordpress-3-0/</link>
		<comments>http://gfmorris.org/archives/2010/06/17/running-wordpress-3-0/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 21:17:51 +0000</pubDate>
		<dc:creator>Geof F. Morris</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://gfmorris.org/?p=42</guid>
		<description><![CDATA[I&#8217;ve upgraded this site to WordPress 3.0 as a pathfinder for a number of reasons, one of them being that I have a professional interest in doing so. This site is always my bleeding edge for WordPress upgrades&#8212;if it doesn&#8217;t break here, it typically won&#8217;t break elsewhere&#8230;.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve upgraded this site to WordPress 3.0 as a pathfinder for a number of reasons, one of them being that I have a professional interest in doing so.  This site is always my bleeding edge for WordPress upgrades&#8212;if it doesn&#8217;t break here, it typically won&#8217;t break elsewhere&#8230;.</p>
<img src="http://gfmorris.org/wordpress/?ak_action=api_record_view&id=42&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://gfmorris.org/archives/2010/06/17/running-wordpress-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing an On-the-Phone AppleScript</title>
		<link>http://gfmorris.org/archives/2010/06/16/developing-an-on-the-phone-applescript/</link>
		<comments>http://gfmorris.org/archives/2010/06/16/developing-an-on-the-phone-applescript/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 19:12:48 +0000</pubDate>
		<dc:creator>Geof F. Morris</dc:creator>
				<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[Adium]]></category>
		<category><![CDATA[system volume]]></category>

		<guid isPermaLink="false">http://gfmorris.org/?p=39</guid>
		<description><![CDATA[I&#8217;m now working from home, but I can&#8217;t stand not having music going when I&#8217;m working. I often answer the phones, so it was important to me to have an AppleScript that would quickly do the following: Mute the system volume so I can focus on the customer. Pause iTunes. Setting my Adium status as [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m now <a href="http://wphelpcenter.com/">working from home</a>, but I can&#8217;t stand not having music going when I&#8217;m working.  I often answer the phones, so it was important to me to have an AppleScript that would quickly do the following:</p>
<ol>
<li>Mute the system volume so I can focus on the customer.</li>
<li>Pause iTunes.</li>
<li>Setting my Adium status as On-the-Phone so my co-workers know I&#8217;m on the phone.</li>
</ol>
<p>The fun thing is that I&#8217;ve got to get the script to do the reverse when invoked again.  Otherwise, what use is it?</p>
<p>My first step was to use <a href="http://leafraker.com/2007/11/13/mute-system-volume-with-apple-script-and-quicksilver/">Leaf Raker&#8217;s suggestion for how to mute the system volume with AppleScript</a>.  The approach there works fine; the only issue is going to be that the system volume returns to 50 when it&#8217;s invoked a second time.  If you&#8217;re always using this script during the day, though, that shouldn&#8217;t be a problem.  Thanks, Leaf Raker, for getting me started!</p>
<p>The second step is pausing iTunes.  If you read the iTunes Applescript Dictionary, you&#8217;ll see that it has a verb &#8220;playpause&#8221; that toggles the status of iTunes.  This is helpful for me when I&#8217;m listening to a podcast while working, because I would like to not lose my place while I&#8217;m on the phone.  So it&#8217;s <code>tell application "iTunes" to playpause</code> to make it happen.</p>
<p>The last step, of course, is the Adium status change.  <a href="http://trac.adium.im/wiki/AppleScript_Support_1.2">The Adium wiki has a page on their AppleScript support</a>, and after a number of tests, I found that this worked:</p>
<pre>
tell application "Adium"
	set thisStatus to the status type of the first account
	if thisStatus is available then
		set the status type of the first account to away
		set the status message of the first account to
		"I'm on the phone; be with you shortly"
	else
		set the status type of the first account to available
		set the status message of the first account to ""
	end if
end tell
</pre>
<p>Now, this only works for my setup because I have the one account in Adium on this machine&#8212;Adium, for me, is dedicated to the IM support I have with work.  Multiple-account setups would take some sniffing; this is done with <code>of account "somename"</code>, rather than &#8220;the first account&#8221;.  Of course, if you&#8217;re in my situation&#8212;working from home, wanting to set your status away when you&#8217;re on the phone&#8212;you probably only have one account in Adium that needs toggling.  [You better not be on multiple IM channels if you're telecommuting, or you won't get anything done!]</p>
<p>The whole script is as follows:</p>
<pre>
set curVol to (get (output volume of (get volume settings)))
if curVol > 0 then
	set volume output volume 0
else
	set volume output volume 50
end if

tell application "iTunes" to playpause

tell application "Adium"
	set thisStatus to the status type of the first account
	if thisStatus is available then
		set the status type of the first account to away
		set the status message of the first account to
		"I'm on the phone; be with you shortly"
	else
		set the status type of the first account to available
		set the status message of the first account to ""
	end if
end tell
</pre>
<p>You can also download this: <a href="http://gfmorris.org/wordpress/wp-content/uploads/2010/06/on-phone.scpt">on-phone.scpt</a>.</p>
<p>As always: shared without license and support.  I&#8217;ll help if you ask questions in the comment, but I am under no obligation to get you to done.  I worked to figure this one out, so you can work, too.  <img src='http://gfmorris.org/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Unlike with <a href="http://gfmorris.org/archives/2010/06/06/update-to-my-spam-reporting-applescripts/">my Mail scripting</a>, I invoke this with the excellent <a href="http://www.obdev.at/products/launchbar/index.html">Launchbar</a>, although I&#8217;m sure that <a href="http://quicksilver.en.softonic.com/mac">Quicksilver</a> will invoke it for you, too.  I just put this in ~/Library/Scripts for safe-keeping.</p>
<img src="http://gfmorris.org/wordpress/?ak_action=api_record_view&id=39&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://gfmorris.org/archives/2010/06/16/developing-an-on-the-phone-applescript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Update to my Spam-Reporting AppleScripts</title>
		<link>http://gfmorris.org/archives/2010/06/06/update-to-my-spam-reporting-applescripts/</link>
		<comments>http://gfmorris.org/archives/2010/06/06/update-to-my-spam-reporting-applescripts/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 03:21:11 +0000</pubDate>
		<dc:creator>Geof F. Morris</dc:creator>
				<category><![CDATA[AppleScript]]></category>

		<guid isPermaLink="false">http://gfmorris.org/?p=34</guid>
		<description><![CDATA[I think I tried to do this back when I set these spam-reporting AppleScripts up originally, but I couldn&#8217;t find the right variable to set. Turns out I didn&#8217;t look hard enough. Here&#8217;s the change: tell application "Mail" set theMessages to the selection repeat with thisMessage in theMessages set newMessage to make new outgoing message [...]]]></description>
			<content:encoded><![CDATA[<p>I think I tried to do this back <a href="http://gfmorris.org/archives/2007/10/17/applescript-spam-handler/">when I set these spam-reporting AppleScripts up originally</a>, but I couldn&#8217;t find the right variable to set.  Turns out I didn&#8217;t look hard enough.  Here&#8217;s the change:</p>
<pre>tell application "Mail"
	set theMessages to the selection
	repeat with thisMessage in theMessages
		set newMessage to make new outgoing message at end of outgoing messages
		tell newMessage
			set content to thisMessage's source
			set subject to thisMessage's subject
			make new to recipient with properties {address:"spam@uce.gov"}
		end tell
		send newMessage
		<strong>set junk mail status of thisMessage to true</strong>
		set read status of thisMessage to true
		move thisMessage to mailbox "INBOX/ConfirmedJunk" of account "[$account]"
	end repeat
end tell</pre>
<p>Simple enough, no?  The updated scripts: <a href="http://gfmorris.org/wordpress/wp-content/uploads/2010/06/spam_uce_gov.scpt">spam_uce_gov.scpt</a> and <a href="http://gfmorris.org/wordpress/wp-content/uploads/2010/06/spoof_paypal_com.scpt">spoof_paypal_com.scpt</a>.  You could, of course, further modify the <i>{address:&#8221;email@email.tld&#8221;}</i> to send wherever you like.  If, for example, you have a specific place you&#8217;re fighting phishing attempts [e.g., your bank], and you know their phishing address, set one up for them.</p>
<p><strong>Additional Thoughts</strong></p>
<p>I use these two scripts with the excellent <a href="http://indev.ca/MailActOn.html">Mail Act-On</a> package.  I have rules for each: J for general junk mail, and P for PayPal/eBay spam.  Actually, my MA-O use is what drove me to seek out the junk mail status flag, because otherwise to train Mail&#8217;s spam filter took an extra step.  I wish I&#8217;d Googled a little harder three years ago, as I&#8217;d probably have saved myself an hour of typing and clicking over that time.</p>
<img src="http://gfmorris.org/wordpress/?ak_action=api_record_view&id=34&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://gfmorris.org/archives/2010/06/06/update-to-my-spam-reporting-applescripts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TiVo and the iPad</title>
		<link>http://gfmorris.org/archives/2010/04/12/tivo-and-the-ipad/</link>
		<comments>http://gfmorris.org/archives/2010/04/12/tivo-and-the-ipad/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 02:43:53 +0000</pubDate>
		<dc:creator>Geof F. Morris</dc:creator>
				<category><![CDATA[Things That Should Be Built, But Not By Me]]></category>

		<guid isPermaLink="false">http://gfmorris.org/?p=32</guid>
		<description><![CDATA[Why has TiVo not built an iPad application yet? Ideally, it should do three things, two of which are directly related: Allow the scheduling of recordings from within the app. Yes, this can be done on TiVo.com, but anyone who&#8217;s used that UI can tell you that, uh, it&#8217;s clunky and very un-TiVo. Monitor the [...]]]></description>
			<content:encoded><![CDATA[<p>Why has TiVo not built an iPad application yet?  Ideally, it should do three things, two of which are directly related:</p>
<ol>
<li>Allow the scheduling of recordings from within the app.  Yes, this can be done on TiVo.com, but anyone who&#8217;s used that UI can tell you that, uh, it&#8217;s clunky and very un-TiVo.</li>
<li>Monitor the recordings currently scheduled on the TiVo in question.  Yes, this is also done on the Web site, and while it&#8217;s easier to find, it&#8217;s not as easy as it could be.  This would be related to the first in letting you see a) what&#8217;s being recorded and b) resolve conflicts in the TiVo app.</li>
<li>On the local network where your TiVo resides, show the current queue of shows on the TiVo.  This can be done, as <a href="http://www.dashboardwidgets.com/showcase/details.php?wid=281">the TiVo Now Playing Dashboard widget shows</a>.</li>
</ol>
<p>Admittedly, the last one could be done with a standalone app, but it seems like something that should be a part of a larger TiVo-focused app.  Also, there&#8217;d be plenty of other opportunities for the app: in-app purchases equivalent to the TiVo store, etc.  Seems like a win to me.</p>
<img src="http://gfmorris.org/wordpress/?ak_action=api_record_view&id=32&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://gfmorris.org/archives/2010/04/12/tivo-and-the-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two Apps I&#8217;d Buy</title>
		<link>http://gfmorris.org/archives/2009/05/11/two-apps-id-buy/</link>
		<comments>http://gfmorris.org/archives/2009/05/11/two-apps-id-buy/#comments</comments>
		<pubDate>Tue, 12 May 2009 02:48:29 +0000</pubDate>
		<dc:creator>Geof F. Morris</dc:creator>
				<category><![CDATA[Things That Should Be Built, But Not By Me]]></category>

		<guid isPermaLink="false">http://gfmorris.org/?p=29</guid>
		<description><![CDATA[Here&#8217;s a couple ideas that have been rattling around the ol&#8217; brain for the last little bit &#8230; If I&#8217;ve got the lyrics entered into the metadata of a song in iTunes, I want to see them superimposed onto my desktop. That way, if I have everything hidden save the Finder, I can read the [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a couple ideas that have been rattling around the ol&#8217; brain for the last little bit &#8230;</p>
<ol>
<li>If I&#8217;ve got the lyrics entered into the metadata of a song in iTunes, I want to see them superimposed onto my desktop.  That way, if I have everything hidden save the Finder, I can read the lyrics while I listen to the song.</li>
<li>I want a Bluetooth application that displays a Growl notification with whatever phone number is ringing on my iPhone.  Do I want to careen across the house to pick up my ringing phone or not?  Really, Apple.</li>
</ol>
<p>As always, these are free ideas for which I&#8217;d only like passing credit, not anything I&#8217;d want money for, you know.  I just want them.</p>
<img src="http://gfmorris.org/wordpress/?ak_action=api_record_view&id=29&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://gfmorris.org/archives/2009/05/11/two-apps-id-buy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
