Dashboard Widget: Call/Pass variables from Applescript to Javascript?

Hi all,
I’m in the early stages of developing a Dashboard Widget and would like to know how (or if it is even possible) to pass variables from an Applescript to Javascript, and vice versa. The only thing I’ve seen about it in the forum is “do Javascript”. Since Widgets are basically HTML docs that can run Javascripts, is there any coding in Javascript or HTML to “do Applescript” in a manner of speaking?

Thanks for helping!

Dashboard components can access the Unix shell, so executing AppleScripts via osascript may be a suitable solution if you just need to do simple stuff. (Might help if you summarised what the widget is and what sort of tasks you’re wanting AppleScript to do.)

Alternatively, if you’re willing to drop into ObjC, the other possibility would be to write a widget plugin using objc-appscript instead of AppleScript to communicate with applications. (I may be able to give some help here as it’s something I want to explore myself.)



Don’t have a clear idea of what you need or want, but there are some minimal capabilities of passing HTML ‘get’ output to AppleScript in ‘Missing Link’ that may interest you.


Peter B.