Muffinresearch Labs by Stuart Colville

mac tip: Lock screen and pause iTunes | Comments (0)

Posted in Apple, Code on 24th April 2008, 12:09 am by Stuart

In the past I’ve used a specific app that allowed configuration of a keystroke to lock my screen but in setting up a new machine I thought I really want to add the ability to pause iTunes as well as locking the screen. The locking part is caused by having the screen saver set up to lock the screen - this is set in security preferences. To make this all happen just requires the following noddy applescript.

try
	do shell script "killall -s iTunes"
	tell application "iTunes"
		pause
	end tell
end try
do shell script "open '/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app'"

To get the keystroke configured I’m using quicksilver triggers (to do this you’ll need quicksilver installed), first put the script above into script editor, save as an application bundle the the location of your choice and then point a trigger to that app file and define your keystroke. I also set the scope to all applications. Done!

Update: Added a dirty little try catch to only run the pause when iTunes is open

Post Tools

Comments: Add yours







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Standalone mac battery charger|(0)

Got a spare mac battery? I’ve often wondered why up until now no-one’s produced a standalone charger so that you can charge batteries without having to plug them into the mac. Fortunately Fastmac.com have produced a standalone charger that allows you to do just that. and it’s compatible with iBooks, Powerbooks, macbooks and Macbook Pros. It’s also 110/200v. Exactly what I was looking for!

Django Admin Ominigraffle Stencil|(0)

Colleague Alex Lee has created a nice stencil for omingraffle with the Django Admin UI components, perfect for wireframing customised admin screens. For more details and to download the stencil see Alex’s Blog csensedesign.co.uk

Photos on Flickr

© Copyright 2004-08 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by 1&1 This page was baked in 0.725s.