On May 21, 2007, at 8:28 AM, Bill Briggs wrote:
Knowing something about the application would be good, but in the absence of that, you might have to pipe the arguments in, as you do in an application like bc.
If you want to pass anything from stdin to bc (as opposed to interactive mode) you need to write it like this.
echo "last=0;for(x=1;x<100;x++) print (last + (1/(x^2))), \" \n\"" | bc
and bc takes the input and your result appears in stdout. I suspect that piping the arguments would work, but as I say, not knowing what the application wants makes it difficult to say for sure. Note that the above _expression_ would have to be put in a "do shell script" statement and the appropriate characters escaped for AppleScript.
But the simple use of "options", as suggested by Tobias, may work. We're in the dark a bit here.
- web
At 5:18 PM +0200 5/21/07, Tobias Langlotz wrote: Can you call your application via command line?! Then this shoud be easy like example below:
do shell script "ls -al"
Hope this helps!? Cheers Tobias
Thanks for your responses, I appreciate the help.
What would you like to know about the application? I'm not sure what more information I can give you that would help you.
I've tried the "do shell script ''", but that leaves the Script window open while the application is running. Not very elegant, and I doubt my client is going to want that for his customers.
Also, calling the application as a shell script requires the AppleScript to know the absolute path of the application before shipping the script. Since this application, and its associated AppleScripts will be distributed to users, who may put the application anywhere on their hard drive, I don't think a shell script solution will work.
Thanks again for your help, Mike
-- ********************************* Mike Dougherty 858.232.3635
*********************************
********************************** Mike Dougherty 858.232.3635 Dougherty Technologies **********************************
|