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 Central

I would love to see...

Author Message
totallyGreg



Joined: 27 Jan 2005
Posts: 1

Posted: Thu Jan 27, 2005 - 2:19 pm    Post subject: I would love to see... Reply with quote

A widget template for running a unix command. I've seen apples hint at creating an object.

Code:

var obj = widget.system("ps -aux | grep Dashboard", null);
alert(obj.outputString);


Unfortunately I have yet to get it to display anything (probably due to my utter lack of javascript knowledge.

A simple template of this would be most helpful.

Most obliged,
greg
View user's profile Send private message Send e-mail AIM Address Widgets
mikepj



Joined: 27 Jan 2005
Posts: 4
Location: Mt. Pleasant, MI

Posted: Thu Jan 27, 2005 - 2:53 pm    Post subject: Reply with quote

Here's some quick code that should work for what you want to do.

--Mike

Code:
<html>
  <script language='Javascript'>
    function runCommand () {
      if (widget) {
        var obj = widget.system('ps -aux', null);
        document.getElementById('myText').innerHTML = obj.outputString;
      }
      else {
        document.getElementById('myText').innerHTML = "You're not running this under Dashboard.";
      }
    }
  </script>

  <body onLoad = "runCommand();">
    <span id='myText'></span>
  </body>
</html>
View user's profile Send private message Send e-mail Visit poster's website Widgets
robwatterson



Joined: 27 Jan 2005
Posts: 1

Posted: Thu Jan 27, 2005 - 10:24 pm    Post subject: Reply with quote

I'm not a developer, just an end user, but I would like to see someone develop a widget that would display the schedule, including TV schedule, of your favorite sports teams.
View user's profile Send private message Send e-mail Widgets
gnome
Administrator


Joined: 26 Sep 2004
Posts: 145

Posted: Thu Jan 27, 2005 - 10:40 pm    Post subject: Reply with quote

rob--that certainly might lend itself to some interesting GUI ideas. Smile
View user's profile Send private message Widgets
pm
Administrator


Joined: 24 Aug 2004
Posts: 398

Posted: Thu Jan 27, 2005 - 10:42 pm    Post subject: Reply with quote

robwatterson wrote:
I'm not a developer, just an end user, but I would like to see someone develop a widget that would display the schedule, including TV schedule, of your favorite sports teams.


Yes, those are great ideas. Take a look at this thread too.
View user's profile Send private message Send e-mail Widgets
blurry
Quality Control


Joined: 03 Feb 2005
Posts: 33
Location: UK

Posted: Thu Feb 03, 2005 - 4:27 pm    Post subject: Re: I would love to see... Reply with quote

totallyGreg wrote:

Code:

var obj = widget.system("ps -aux | grep Dashboard", null);
alert(obj.outputString);


Unfortunately I have yet to get it to display anything (probably due to my utter lack of javascript knowledge.


It won't work because you're not running Tiger. widget.system is a call to Dashboard. Apple have made extension to JavaScript and CSS for Dashboard.

I've been thinking about doing a widget to do this - what sort of commands would you want to run?

George.
View user's profile Send private message Send e-mail Widgets
Chris



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

Posted: Thu Feb 03, 2005 - 7:35 pm    Post subject: Re: I would love to see... Reply with quote

blurry wrote:
totallyGreg wrote:

Code:

var obj = widget.system("ps -aux | grep Dashboard", null);
alert(obj.outputString);


Unfortunately I have yet to get it to display anything (probably due to my utter lack of javascript knowledge.


It won't work because you're not running Tiger. widget.system is a call to Dashboard. Apple have made extension to JavaScript and CSS for Dashboard.

I've been thinking about doing a widget to do this - what sort of commands would you want to run?

George.


It's either that or you're not looking at console.app where javascript alerts show in the Dashboard.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
flashmanburgess
Quality Control


Joined: 31 Jan 2005
Posts: 21
Location: Gig Harbor

Posted: Thu Feb 03, 2005 - 10:31 pm    Post subject: Reply with quote

robwatterson wrote:
I'm not a developer, just an end user, but I would like to see someone develop a widget that would display the schedule, including TV schedule, of your favorite sports teams.


Something like so? Clicking on the schedule bar would display the listings and stations it was available on. Working on that screen now.

View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN MessengerWidgets
blurry
Quality Control


Joined: 03 Feb 2005
Posts: 33
Location: UK

Posted: Fri Feb 04, 2005 - 6:41 am    Post subject: TV schedule Reply with quote

I'm thinking of doing a generic widget for getting back TV schedules. I was thinking of scraping data from onthebox.com, which would work fine here in the UK, but people elsewhere in the world might have other channels they want to get schedules for.

George.
View user's profile Send private message Send e-mail 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