| Article: |
AppleScript Primer for Mac OS X | |
| Subject: | CLI & Applescript | |
| Date: | 2002-02-12 09:23:38 | |
| From: | naepstn | |
|
How extensively can you integrate CLI commands and Applescript?
|
||
Showing messages 1 through 2 of 2.
-
CLI & Applescript
2002-05-20 18:28:26 mpf [View]
-
CLI & Applescript
2002-02-12 17:44:55 bwperry [View]
You can do a lot with AppleScript (AS) and "do shell script", which uses /bin/sh as the shell (as far as I know). Take the commands that you want to integrate into an AS and test them first with a "do shell script" command used in a simple script; experiment a bit. This is a new technology. I've found that certain types of shell commands passed to "do shell script" as arguments, such as the "history" command, will return errors.
As I suggested in my article, this has a lot of potential for combining advanced desktop automation with the wealth of Unix shell commands (particularly when given a user interface in Studio). I'd imagine that Apple would continue to refine and enhance what the scripter can accomplish with "do shell script."
I'd like this to become a recurring column. Email the O'Reily editors and make a request :)



regards
matthew