I am having inconsistent success using widget.system to execute
AppleScript commands.
For example, this code works -
var commandLine = "/usr/bin/osascript -e 'tell application \"TextEdit
\" activate end tell'";
widget.system(commandLine, null);
However, it doesn't work for all applications. If I substitute
"iTunes" or "Safari" for "TextEdit", it will launch the named
application. But, it *won't* work if I use the names "Preview" or
"Mail". Most importantly, it won't work with the application that I
have written which I need to access with my widget. If I use Script
Editor, I can launch any of these applications with this AppleScript
command.
I don't want to use widget.openApplication because I want leave the
Dashboard and my widget active, so that I can use my widget to send
additional AppleScript commands to the open application.
Thanks for any tips.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/dashboard-dev/email@hidden