• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Program arguments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Program arguments


  • Subject: Re: Program arguments
  • From: Mike Dougherty <email@hidden>
  • Date: Mon, 21 May 2007 08:51:49 -0700

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
email@hidden
858.232.3635

http://www.google.com/talk/
*********************************





**********************************
 Mike Dougherty
 858.232.3635
 email@hidden
 Dougherty Technologies
 http://www.doughertytech.com
**********************************


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Program arguments
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Program arguments (From: Mike Dougherty <email@hidden>)
 >Re: Program arguments (From: Tobias Langlotz <email@hidden>)
 >Re: Program arguments (From: Bill Briggs <email@hidden>)

  • Prev by Date: Re: Program arguments
  • Next by Date: Re: Program arguments
  • Previous by thread: Re: Program arguments
  • Next by thread: Re: Program arguments
  • Index(es):
    • Date
    • Thread