06 November 2007
Open Sourced Heavy metal
The amazing Quicksilver is now open source. I am sure much goodness will follow.
29 October 2007
19 October 2007
Why I don't like iTunes Ringtones
This must seriously be the most annoying "feature" ever. And it is not for the lack of trying either. But every time I think 'This would be a good ringtone" it is either not available as a ringtone or I bought the song on CD or something else goes wrong. Why a label or artist would decide to not offer songs as ringtones is beyond me. Hello? I am trying to give you extra money?
16 July 2007
Cancel confused drags
It's always fun if you're sitting in a group of people everybody is hacking at their laptops and somebody says "I wish I could do this..." and the answer is really simple:
While dragging an item between windows using Exposé and other fancy stuff you might get confused and or lost. You can't just let go because the item be moved or copied to a place you don't want it to be. Use escape to cancel a drag at any time.
While dragging an item between windows using Exposé and other fancy stuff you might get confused and or lost. You can't just let go because the item be moved or copied to a place you don't want it to be. Use escape to cancel a drag at any time.
29 June 2007
01 May 2007
TED talks now online...
This might be old news for you (it did happen a few days ago already) but TED now has a website with talks and performances in audio and video: TED. You have to endure BMW ads (they are the sponsor) but there could be worse sponsors and it's definitely worth it.
If you are overwhelmed by te choices of movies: this is a good place to start: David Pogue says Simplicity sells. We all enjoy some Microsoft bashing, don't we?
If you are overwhelmed by te choices of movies: this is a good place to start: David Pogue says Simplicity sells. We all enjoy some Microsoft bashing, don't we?
20 April 2007
28 February 2007
Apple Events with Ruby
Matt Neuberg introduces rb-appscript in this MacDevCenter article. which allows ruby code to use AppleScript like commands to send Apple Events to other applications. In simpler words, use ruby like AppleScript.
Interesting... one of these "have to try this when I have time" things.
Interesting... one of these "have to try this when I have time" things.
16 January 2007
Remote man pages
Great hint on Extra Pepperoni: Remote ‘
If you want to use this with SubEthaEdit instead of BBEdit then do
or with the built-in TextEdit
man’ with BBEdit. Very powerful tool, not only when you work with other Unix systems. Mac OS X Server has some extra tools and man pages that are not available on the 'normal' Mac OS X installation.If you want to use this with SubEthaEdit instead of BBEdit then do
ssh $1 man $2 | col -b | see -t "$2@$1"
or with the built-in TextEdit
ssh $1 man $2 | col -b | open -f
11 January 2007
04 December 2006
No Vista Service Packs...
Ballmer: Vista to Spur 'Wave of Innovation'
Asked about the timeline for Vista service packs, Ballmer quipped that as it is the highest-quality, most secure and reliable Windows operating system ever, there should be no need for a service pack.
I'll be back when I catch my breath again... seriously.
17 November 2006
Google Earth KML Date Formatting
I am just building stuff using Google Earth, especially the new time stamped stuff. Very nice, really.
However GE expects dates in the format
and there you go. Nevertheless GE still choked on my formatted dates:
Well here is the solution:
However GE expects dates in the format
2006-11-17 which isn't so bad in itself. It's AppleScript's fault that it is a pain to format dates other than the system's preset. You just do aset dateString to (year of theDate) & "-" & (month of theDate as number) & "-" & (day of theDate)
and there you go. Nevertheless GE still choked on my formatted dates:
2006-9-5 can't be parsed by Google Earth. The leading 0 is mandatory!? WTF!?Well here is the solution:
on format_date(theDate)
tell theDate
set y to year as string
set m to (month of theDate as number) as string
if (count of m) is 1 then set m to "0" & m
set d to day as string
if (count of d) is 1 then set d to "0" & d
end tell
return y & "-" & m & "-" & d
end format_date
Script Friday: Keynote Slide Sets
I do a lot of presentations. I put together various slide decks on the different topics and then depending on the event, customer and time available I skip and reveal a different subset of slides. If I want to keep track of which slides I showed where then all I can do is have multiple copies of the same Keynote Presentation. Which is a pain, because say I want to change the content of one slide from say "October 2006" to "November 2006" then I have to remember which copy is the most current or do the change in all copies.
Wouldn't it be great if I could store multiple slide sets in one Keynote Presentation?
Keynote 3 introduced AppleScript support. Though the implementation is... er... special, it is surprisingly adept to this task.
Use the notes area of the slide to store the skipped/shown status of a slide. Decide on a name for your slide set. For Slides that should be shown in this Slide Set add a line with <Slide Set Name> to the notes. For slides that should be skipped add <Slide Set Name skip>. Obviously if your name ends in "skip", you're in deep trouble. I used the <> as markers, change the scripts if that bothers you. If a slide has neither in its notes the script will leave it unchanged. This way you can have different slide sets for different topics and the won't affect each other.
Then show all slides (or change the skip/hide setting of slides in some weird way) run this script, enter the name of the set and enjoy.
Restore Slide Set
Ok, so this manually setting the markers in slides will get tiresome really quickly. So I wrote a script to store the current slide set, run it, give a name for your slide set... wonderful.
WARNING: the way AppleScript (or specifically Keynote's implementation) handles the notes field means that when the script has to change the notes field ALL rich text formatting will be lost... :( If you don't like that, you will have to add the markers manually.
Save Slide Set
If you are bored of a certain Slide Set, you can remove the markers again:
Remove Slide Set Tags
This opens up a whole bunch of possibilities. You could have one Slide Deck with three slide sets, one for 25 minutes, one for 50 minutes and one for 100 minutes. Let's call them "Hurry Up!", "Standard" and "Detailed". Now before a presentation you could choose the proper slide set and go. However we all know how these things go. Sometimes you get a lot of questions on a certain topic and you would actually like to be able to dig deeper into this. So you could drop out of presentation mode, change the slide set to detailed and continue. Then after you are done with this topic you switch to the "Hurry Up!" set to make up for lost time. To make this easier, use "pre-canned" scripts with the marker name built-in.
Standard Set
I use Salling Clicker to switch on-the-fly, in presentation mode using the cell to execute these scripts. Unfortunately Keynote doesn't allow you to modify slides in the background using AppleScript, so the scripts will actually drop presentation mode, do their stuff, then resume presentation mode. It is a brief but ugly flash of your desktop on the screen. However I think the pay off is worth it. You should be able to assign these scripts to a HotKey Manager or other way of executing them, I leave that as an exercise for the reader.
Please let me know how you use these.
Wouldn't it be great if I could store multiple slide sets in one Keynote Presentation?
Keynote 3 introduced AppleScript support. Though the implementation is... er... special, it is surprisingly adept to this task.
Use the notes area of the slide to store the skipped/shown status of a slide. Decide on a name for your slide set. For Slides that should be shown in this Slide Set add a line with <Slide Set Name> to the notes. For slides that should be skipped add <Slide Set Name skip>. Obviously if your name ends in "skip", you're in deep trouble. I used the <> as markers, change the scripts if that bothers you. If a slide has neither in its notes the script will leave it unchanged. This way you can have different slide sets for different topics and the won't affect each other.
Then show all slides (or change the skip/hide setting of slides in some weird way) run this script, enter the name of the set and enjoy.
Restore Slide Set
Ok, so this manually setting the markers in slides will get tiresome really quickly. So I wrote a script to store the current slide set, run it, give a name for your slide set... wonderful.
WARNING: the way AppleScript (or specifically Keynote's implementation) handles the notes field means that when the script has to change the notes field ALL rich text formatting will be lost... :( If you don't like that, you will have to add the markers manually.
Save Slide Set
If you are bored of a certain Slide Set, you can remove the markers again:
Remove Slide Set Tags
This opens up a whole bunch of possibilities. You could have one Slide Deck with three slide sets, one for 25 minutes, one for 50 minutes and one for 100 minutes. Let's call them "Hurry Up!", "Standard" and "Detailed". Now before a presentation you could choose the proper slide set and go. However we all know how these things go. Sometimes you get a lot of questions on a certain topic and you would actually like to be able to dig deeper into this. So you could drop out of presentation mode, change the slide set to detailed and continue. Then after you are done with this topic you switch to the "Hurry Up!" set to make up for lost time. To make this easier, use "pre-canned" scripts with the marker name built-in.
Standard Set
I use Salling Clicker to switch on-the-fly, in presentation mode using the cell to execute these scripts. Unfortunately Keynote doesn't allow you to modify slides in the background using AppleScript, so the scripts will actually drop presentation mode, do their stuff, then resume presentation mode. It is a brief but ugly flash of your desktop on the screen. However I think the pay off is worth it. You should be able to assign these scripts to a HotKey Manager or other way of executing them, I leave that as an exercise for the reader.
Please let me know how you use these.
15 November 2006
(Late) Script Friday: Fading Terminal Windows
This script was inspired by the scripts of Erik Barzeski and Daniel Jalkut.
What the script does is watch your Terminal Windows and if they are busy doing some important process it will slowly fade them into the background (increase the transparency). Once the process is complete (or if you quit the watcher), it will set the transparency back to normal.
Note: there seems to be a bug in Terminal scripting, so that changes in transparency only register when there already is a transparency set in the background color, so you have to set at least a minimal transparency for your default windows. (Move the slider in the Windows Preferences just a tick or two, you won't see it but then everything works fine.)
Some people (like my wife, believe it or not, she uses Terminal) might find all that fading and transparency is distracting. So especially for you (well, her, actually) I wrote a version that will minimize the window instead. (I find that all those windows zipping about are worse than fading windows, but she is a biologist and the stuff she invokes from the command line usually runs for a long long time, so I guess that "ghost letters" on the desktop might be distracting.)
Download the scripts here.
What the script does is watch your Terminal Windows and if they are busy doing some important process it will slowly fade them into the background (increase the transparency). Once the process is complete (or if you quit the watcher), it will set the transparency back to normal.
Note: there seems to be a bug in Terminal scripting, so that changes in transparency only register when there already is a transparency set in the background color, so you have to set at least a minimal transparency for your default windows. (Move the slider in the Windows Preferences just a tick or two, you won't see it but then everything works fine.)
Some people (like my wife, believe it or not, she uses Terminal) might find all that fading and transparency is distracting. So especially for you (well, her, actually) I wrote a version that will minimize the window instead. (I find that all those windows zipping about are worse than fading windows, but she is a biologist and the stuff she invokes from the command line usually runs for a long long time, so I guess that "ghost letters" on the desktop might be distracting.)
Download the scripts here.
Swamped
I'm still here... around... somewhere....
Very busy lots of work. Be back Friday with a neat script.
Very busy lots of work. Be back Friday with a neat script.
02 November 2006
Perceived security
The Boarding Pass Brouhaha is a great summary of the recent fall-out concerning boarding passes. So many of the security measure introduced since 9/11 are just give you the perception of security.
One solution to this particular problem would also be to not give the passenger the option of printing the boarding pass at home. You could still check-in early, securing your seat, but not print the boarding pass. Once you are at the airport, you can print the boarding pass at the machines at the airport. I already do that when I'm on the road and can't print. If TSA only accepted the machine boarding passes, easily recognized by the paper, then it would be much more difficult to forge a boarding pass. Still not impossible, but right now the authenticity of the boarding passes is laughable.
One solution to this particular problem would also be to not give the passenger the option of printing the boarding pass at home. You could still check-in early, securing your seat, but not print the boarding pass. Once you are at the airport, you can print the boarding pass at the machines at the airport. I already do that when I'm on the road and can't print. If TSA only accepted the machine boarding passes, easily recognized by the paper, then it would be much more difficult to forge a boarding pass. Still not impossible, but right now the authenticity of the boarding passes is laughable.
29 October 2006
How to check for UI scripting
How embarrassing. This blog gets a link from MacDevCenter and I have a (minor) bug in the script. I have had UI Scripting enabled for son long that I always forget to check for it in the script. Obviously if somebody else runs the script, nothing happens.
To enable UI scripting go to the Universal Access Preference Pane and enable the checkbox at the bottom of the screen. However good script should check for this and give you a dialog, prompting you to enable it. Here is the code:
(Works with Tiger and up.)
Note to self: paste this in front of every script that uses UI scripting.
To enable UI scripting go to the Universal Access Preference Pane and enable the checkbox at the bottom of the screen. However good script should check for this and give you a dialog, prompting you to enable it. Here is the code:
(Works with Tiger and up.)
tell application "System Events"
if not UI elements enabled then
display dialog "GUI Scripting is not enabled. This script requires GUI scripting, click \"OK\" to enable."
set UI elements enabled to true
end if
end tell
Note to self: paste this in front of every script that uses UI scripting.
27 October 2006
Script Friday: Birthday Address Book Plug-ins
Two quick and fun Address Book Plug-ins, download the archive, put the scripts into
Both don't actually do anything but one will display the age and the other the zodiac when you click on the birthday label in Address Book.
~/Library/Address Book Plug-Ins (create folder if necessary).Both don't actually do anything but one will display the age and the other the zodiac when you click on the birthday label in Address Book.
25 October 2006
.Mac site feed
If you start a blog in iWeb then you will get an RSS feed, that part is simple. however some people don't want to open a blog, but just post individual pages. if you want to keep track of what they are doing there is a RSS feed for the entire site. Just enter:
into your favorite feedreader.
http://rss.mac.com/username/iWeb/Sites.rssinto your favorite feedreader.
Subscribe to:
Posts (Atom)