February 18, 2003
An Answer to my Applescript Conundrum
A while ago I wanted to set up a stupid xterm-like app to stick in the dock of Jaguar. I didn't know why the applescript always hung. An old-skool New Jersey high school comrade showed me The Way (weird, I didn't think any old-skool New Jersey kids knew anything about unix).
Apparently an Applescript script won't terminate if something is hinging on it for stdout and/or stderror. So when you run any apps that you just want to background, you have redirect stdout and stderror somewhere else (/dev/null being one obvious place, though if you're feeling adventurous and have sufficient priveleges, you could overwrite your hard disk with the data...which makes me think that I should write a device driver called /dev/free
The almighty method?
do shell script "/usr/X11R6/bin/xterm -display :0.0 >/dev/null 2>&1 &"
(for those un-unix types that don't know how to redirect stderror).
Yeah, I think I'm going to go download one of those snazzy movable type font packages now.
| TrackBack






by reid
on March 06, 2011
by reid
on November 23, 2009