on 10/4/04 3:37 PM, David Rocks wrote:
Marc Epard wrote:
You could use the osascript command to run a little AppleScript:
osascript -e 'tell application "Safari" to set the URL of (make new document
at the beginning of documents) to "http://www.apple.com"'
Can I do that with a runtime.exec call?
I haven't tried it, but osascript is just a command line tool like any
other, so it should work with runtime.exec.
And will it work with any browser on the mac?
Unfortunately it didn't work when I just tried it with I.E. This works with
IE:
tell application "Internet Explorer" to OpenURL "http://www.apple.com"
But that didn't work with Safari. There ought to be an AppleScript command
that works for both, but I don't see it.
-Marc