Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Development

Applescript

Author Message
Garcon



Joined: 27 Jan 2005
Posts: 18
Location: Boston

Posted: Fri Feb 18, 2005 - 4:04 pm    Post subject: Applescript Reply with quote

The developer site mentions widgets being able to call scripts, but I'm not sure how to do this, as I'm only experianced in standard javascript. The example it gives on how to do this demonstrates using the widget.system object, but the argument it gives is a unix command. What argument do I give to call a script? And how do I send arguments between the javascript and the Applescript?
View user's profile Send private message Send e-mail AIM Address Widgets
Chris



Joined: 27 Jan 2005
Posts: 344
Location: Durham, UK

Posted: Fri Feb 18, 2005 - 5:57 pm    Post subject: Reply with quote

When I've used AppleScript from a widget, I've just called it using osascript and widget.system. Just make the AppleScript echo what you want to stdout so you can pick it up using outputString like you would using any other command line app. (do shell script "echo whatever").
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group