Legal Disclaimer

"...For Dummies" is a registered trademark of Wiley Publishing, Inc. Wiley has not given authorization for this title, nor is it associated in any way with the Wiley (nee IDG Books, nee Hungry Minds) series "... for Dummies."

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 which will write to free blocks on a disk in sequential order, if you want to overwrite your pr0n and s3cr3t d0x without letting the feds find it. Anyway I'm ranting again).

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
Post a comment










Please enter the number above into the box below.









Further back...

Archives