why does this applescript work from PB but not osascript

toisanji

Registered
These 2 applescript don't work from the terminal using osascript.
osascript -e 'tell application "Internet Explorer" to OpenURL "http://www.deadly.org"'
or

osascript -e 'tell application "Internet Explorer"' -e 'OpenURL "deadly.org"' -e 'end tell'

I get the same error for both of these scripts:

execution error: Internet Explorer got an error: Application isn't running. (-600)

Both of these scripts work fine from "script runner" or "project builder"
Could someone point me in the correct direction to run this script form the terminal.
 
Hope this helps:

Try opening the Internet Explorer application before calling an action to it, for example your code should look like this:

----------------
osascript -e 'tell application "Internet Explorer" run
osascript -e 'tell application "Internet Explorer" to OpenURL "http://www.deadly.org"
----------------

Only without the "----------------". Hope that helped! i don't work much with osascript, so I don't know if that 'return' should be in the there, both lines may need to be on the same line. Get it?
 
i found the answer on some other forms. The problem is because I was running the script through ssh. I wasnt running the script locally. You can either run it locally or use the script with the open command to make it run properly. Sorry, I'm too lazy to search and post those links. if searching, just go to google and do "osascript ssh" and it should come up immediately.
 
Back
Top