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



I have run into more problems. When I try to run osascript through runtime.exec in a java program it appears to go into la-la land. I see no activity, and it also appears that the interface is hung. I am able to trace the plugins call to the browser, but when I use osascript it appears to hang on the 1st call and all subsequent calls don't appear in the trace, as if the plugin is hung and not processing any more requests. Not the behavior using the open command or calling the browser directly. There I can see trace records everytime I call the plugin. The call statement looks OK in the trace. And I have no problem with identical calls in the apple script editor or issuing the commands in the terminal shell. Is there something different about the way osascript is executed when called from within a program?

Greg Guerin wrote:

David Rocks <email@hidden> wrote:



The script statement

     tell application "Safari" to open location
    "file:/Macintosh HD/Users/rocks/home.html"

works with all the browsers but with different results.
...
I would want all the browsers to behave the same way.



Browser scripting need not be uniform. There are recommendations, but browser-makers are free to ignore them.




Do you have any idea why IE has such a hard time with a perfectly
acceptable path?



It's probably because IE is using the archaic/classical pathname model of: volumeName:pathName with a naive translation to URLish form. File a bug-report with Microsoft.




Safari and Camino open the default web page and the file in separate
windows if they aren't already running and open the file in a new window
if they already are.



Safari has a Preferences option under the General pane to "Open links from applications" in a new window or in the current window.


In "Standard Additions.osax" there's an Internet Suite command (verb) called 'open location': open location <URL plain text> [error reporting <boolean>]

My guess is that it opens the default browser (or other default URL-scheme
handler), for any given URL.  You might want to try it and see if it
provides a uniform interface to every browser.  I suspect MSIE will still
be different, but only testing will tell.

For more details, use the Script Editor to open the scripting dictionary of:
 /System/Library/ScriptingAdditions/Standard Additions.osax

 -- GG


_______________________________________________ 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


_______________________________________________
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: Greg Guerin <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.