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: Calling widget.system() and F11 Desktop view




On Nov 15, 2005, at 11:35 PM, Brian Klock wrote:

I'll file a bug. Any idea of a workaround? Is there any way other than calling "osascript" to get information from applications like Finder, iTunes, etc.?

This is a serious problem. Even without Dashboard's devmode enabled, the widget environment still exhibits the same behavior. I see a lot of widgets out there that are probably using AppleScript in some way.

Brian


----Origin

Develop your Widget using Widgetarium and then you can directly interact with AppleScript via it's AppleScript extension in your JavaScript:


var source = 'on getCurrentTrack()\ntell application "iTunes"\n get name of current track\n end tell \n end getCurrentTrack";
var script = AppleScript.scriptFromString(source);
var currentTrack = script.getCurrentTrack();


Basically, it allows you to treat AppleScript source code (from a string or a stand alone file) as an object that you can easily interact with like any other object - no mess with osascript, no worries about passing/escaping parameters, etc...



Glenn Andreas                      email@hidden
 <http://www.gandreas.com/> wicked fun!
Widgetarium | the quickest path to widgets

_______________________________________________
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

This email sent to email@hidden
References: 
 >Re: Calling widget.system() and F11 Desktop view (From: "Brian Klock" <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.