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: easiest way to show alertbox and play sound from a wiget?



I will refer you to this line: "A widget can know when Dashboard is active. When Dashboard is hidden, your widget should not consume any CPU time or network resources."

of this site: http://developer.apple.com/documentation/AppleApplications/Conceptual/Dashboard_Tutorial/index.html

when this is the case you might not to make your program a widget.

That being said, here is my code for how to make a widget play sound ( i don't know/haven't tried the alert box issue).

//_javascript_ code
function playNext(){
  var thissound=document.getElementById("next");
  thissound.Play();
}

//html code
<embed src="" autostart=false hidden=true id="next" enablejavascript="true" />

-micah

On May 31, 2005, at 8:32 AM, Walfrieda Schröter wrote:
Hi,
I am developing a widget that runs in the background, but NEEDS to show a 
customized alertbox/infobox upon a certain event and play a sound (kind of 
"Hi, something has just happend!"). It should not bring up Dashboard, but 
only the alertbox on the normal desktop, with an "OK" button to dismiss 
the box.
What would be the most simple and straightforward way to code that? 
Apparently is does not work directly via _javascript_ (all alerts are 
written to the console then, I use this routinely for debugging), so maybe 
this could be achieved by a simple script or something that can be called 
from within the widget? How is it done?


thanks a lot in advance for all kinds of advice,
walli

-- 
Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis
++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++
 _______________________________________________
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


 _______________________________________________
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



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.