Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: runtime.exec



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

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: runtime.exec (From: David Rocks <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.