• 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: update: calling osascript command from php
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: update: calling osascript command from php


  • Subject: Re: update: calling osascript command from php
  • From: Paul Trilsbeek <email@hidden>
  • Date: Wed, 20 Mar 2002 12:10:34 +0100

At 3:28 PM +0100 3/15/02, I wrote:

I'm trying to call the osascript shell command from a php page, but
I can't get it to run.

I now changed the user and group in the Apache configuration to the same ones I'm currently logged in as. I still have to figure out the security risks of this, but at least it runs.

One other thing I found out is that the single quotes don't need to be escaped.

so the example I gave earlier:

shell_exec("osascript -e \'list disks\'")

needs to be:

shell_exec("osascript -e 'list disks'")

actually the equivalent command ` (backtick) also doesn't need escaping for double quotes, so for example:

`osascript -e 'tell application "iTunes"' -e 'quit' -e 'end tell'`

Best,

Paul
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >calling osascript command from php (From: Paul Trilsbeek <email@hidden>)
 >Re: calling osascript command from php (From: James Sentman <email@hidden>)

  • Prev by Date: Looking for an Applescript programmer
  • Next by Date: Re: Set value of FileMaker container?
  • Previous by thread: Re: calling osascript command from php
  • Next by thread: General applescript questions
  • Index(es):
    • Date
    • Thread