|
|
shell scripts
You will probably want to put these sorts of things into a shell script rather than just running them on the command line.
And if you do so, there is another way that you can get parameters into your AppleScript - use shell variables.
Here's how you would do the example from the hint:
I have used the "here document" feature of the shell (with <<EOT) to make the script easier to write and to read.
Of course, you could make the shell variable take its value from the clipboard as in the hint:
shell scripts
I agree that in most cases, it's probably easiest to put $1, $2, etc. directly into the here document. However, here's another idea, from Chris Nebel of AppleScript engineering. Also note that if you're outputting text from your AppleScript, you'll need to feed it through tr to map the \r's to \n's:
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|