If the dialog is posted by an AppleScript 'display dialog' command,
then the dialog is owned by the app named by the innermost 'tell'
block containing the display dialog statement. If it isn't inside a
tell, well, I've never gotten osascript to display a dialog outside
a tell block
You can make the tell the current java application that is doing a
Runtime exec of osascript.
tell application "CommandWrap"
set the date_stamp to ((the current date) as string)
display dialog the date_stamp buttons {"Clipboard", "OK"} default
button 2
if the button returned of the result is "Clipboard" then
set the clipboard to the date_stamp
display dialog "The date stamp is on the clipboard." buttons {"•"}
giving up after 2 default button 1
end if
end tell
worked fine to display the dialog from the current CommandWrap
application. (clipboard stuff also worked)
tell application "Finder" also works but you get a system beep and
the Finder dock icon bounces until you select it and deal with the
dialog. In other words normal notification stuff.
_______________________________________________
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