|
|
The long way?
This seems like the long way around the problem. We've discussed a different solution in the forum already. The solution basically involves using a heredoc in the shell, so arguments can be fed in as well. Here is Paul McCann's example:
The long way?
Here's a much shorter example which might highlight what's going on a little better:
The (really!) long way?
Wow. Or you could just use the actual 'open' command. Type
in the Terminal. It opens a file the same way the Finder would, but also lets you 'open' URLs, specify an app, or whatever. No need for "poor man's open" I think.
The (really!) long way?
Oh really? To think that I hadn't noticed. Thanks so much for open-ing my eyes. Now I can go off and recreate some other wheels.
The long way?
The problem with using a HERE document is that osascript has to compile the entire applescript each time. That may be a length operation if you are either running the script multiple times, or it is a long script. Also, you have to emed the entire applescript inside your sh script, which you may not wish to do.
The long way?
A good point, but if that really becomes a problem, you can just put the main script in a separate, pre-compiled file and only call it from the HERE doc. This allows the complexity of set-up to scale with your needs. |
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.08 seconds |
|