Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

youmacsoiammac

macrumors newbie
Original poster
Apr 15, 2004
4
0
London, UK
Hi all

First of all, I am new to mac, still haven't received my ibook G4, don't know what happen to all the UK suppliers, no stores are in stock.

Seconally, just wondering how much different between AppleScript and C-shell Script? Is it similiar to C-shell on Sun's CDE(Common Desktop Environment)?

Anyway, that's all the question for now, may have somemore once I recived my mac.

Xu
 
AppleScript is about as far from csh script as Pascal is from C, as you can see from these examples.

This one uses the Internet Connect application to dial out:

Code:
tell application "Internet Connect"
	activate
	connect
	quit
end tell


This one uses System functionality to do its work:

Code:
repeat with volumeLevel from 7 to 0 by -1
	set volume volumeLevel
end repeat
repeat with volumeLevel from 0 to 7 by 1
	set volume volumeLevel
end repeat


These execute UNIX commands, one visibly and the other invisibly:

Code:
tell application "Terminal"
	activate
	do script "cd fahproc1; ./fah.sh"
	do script "cd fahproc2; ./fah.sh"
end tell


Code:
do shell script "drutil tray eject"
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.