FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Script for XBOX Media Center

 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows
View previous topic :: View next topic  
Author Message
andrew
Newbie


Joined: 28 Apr 2006
Posts: 4

PostPosted: Fri Apr 28, 2006 3:53 am    Post subject: Script for XBOX Media Center Reply with quote

I came across Salling Clicker a little while ago, thought it was a cool toy, but didn't really have much use for it as I mostly use XBOX Media Center for my music.
Well anyway to cut a long story short tonight I decided to try and implement support for XBMC, and what do you know I got it to work. After a good few hours with my extreme lack of javascript knowledge, the attached file is what I came up with. A bit of a long winded solution as it's phone->pc->xbox but that's what makes it even cooler.
Enjoy, and let me know how you get on with it.

Andrew

edit: I removed the attachment, will upload it again soon! Fixed a few problems already


Last edited by andrew on Fri Apr 28, 2006 1:01 pm; edited 1 time in total
Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Fri Apr 28, 2006 12:27 pm    Post subject: Reply with quote

I'm not an XBOX Media Center user, but thanks for this script.

[b]Users[/b] should note that the first line of the js file needs customization; you have to enter your XBOX's IP address.

[b]Scripters[/b] should note that the script is an interesting example of how one can applications that have an HTTP interface.

Could anyone tell me whether XBOX Media Center supports zeroconf? That'd open up some interesting possibilities for the future? If not, I'd love to see this added to the XBMC software.

Best.
--
Jonas


Last edited by salling on Fri Apr 28, 2006 2:39 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
andrew
Newbie


Joined: 28 Apr 2006
Posts: 4

PostPosted: Fri Apr 28, 2006 1:08 pm    Post subject: Reply with quote

XBMC does support some form of autodiscovery, I've no idea of the protocol it uses though. I'll look into it soon.
Is that the way you're supposed to script using HTTP and salling clicker by the way? I've barely used javascript before, and definitely not activex object scripting. Was going to ask on here but thought I'd have a try first!

Anyway new version coming soon which works a lot better (last one was rather unstable).
Back to top
View user's profile Send private message
andrew
Newbie


Joined: 28 Apr 2006
Posts: 4

PostPosted: Fri Apr 28, 2006 2:31 pm    Post subject: Reply with quote

Here's the latest version


XBMCRemote.zip
 Description:

Download
 Filename:  XBMCRemote.zip
 Filesize:  3.49 KB
 Downloaded:  2534 Time(s)

Back to top
View user's profile Send private message
andrew
Newbie


Joined: 28 Apr 2006
Posts: 4

PostPosted: Fri Apr 28, 2006 5:34 pm    Post subject: Reply with quote

Hi jonas,
with regards to autoconf, I found out about the protocol xbmc uses for auto discovery, it's very simple, documented (to an extent) [url=http://forums.xbox-scene.com/index.php?s=&showtopic=137059&view=findpost&p=941589]here[/url]. Problem being I'm not sure how to work with UDP & javascript?
[/url]
Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Fri Apr 28, 2006 8:57 pm    Post subject: Reply with quote

It's probably beyond the capabilities of pure JScript. I was hoping they'd used a standard protocol for this, in which case I could have built something into Clicker to deal with it.

There are at least two open source implementations of zeroconf (Howl and Avahi), in addition to Apple's Bonjour available that they could add to their solution to advertize their service in a standards-compliant way.

(note: I'm not saying their solution is bad; it's just making it more difficult for other developers to support)

Best.
--
Jonas

[quote="andrew"]Hi jonas,
with regards to autoconf, I found out about the protocol xbmc uses for auto discovery, it's very simple, documented (to an extent) [url=http://forums.xbox-scene.com/index.php?s=&showtopic=137059&view=findpost&p=941589]here[/url]. Problem being I'm not sure how to work with UDP & javascript?
[/url][/quote]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
wil33z
Newbie


Joined: 29 May 2006
Posts: 2

PostPosted: Tue May 30, 2006 8:44 am    Post subject: Awsome! Reply with quote

Your script is the most useful script i have found so far! Although it is very limited and in comparison to the standard iTunes script it lacks many features. I however am like you, i have no use for iTunes as all my music is played from my Xbox.

My main issue with the script is that you can only change track from within the current directory/playlist. Would it be possible to have a listing of all the folders (Album/Artist) in the library to select from? Or a simple folder navigation?

I have tried to make the changes myself, but i am too usesless with Jscripting. I have never used it before.

I will try to learn some more about jscripting on the net and will try again. Thanks for your script and any improvments you might make.
Back to top
View user's profile Send private message
CannonBall
Newbie


Joined: 22 Aug 2006
Posts: 1
Location: Sweden

PostPosted: Tue Aug 22, 2006 10:48 pm    Post subject: Some more XBMC Scripts Reply with quote

Hi there!
I have made some additional XBMC-scripts, one that works as a remotecontrol, one that browse and selects music, and one that browse and selects video.

add these rows to andrew's Remote-script begining at line 17 and you will find my scripts under the "More"-menu of his script.
[code:1]
var moreMenuItems = new Array();
moreMenuItems[0] = "Shutdown XBOX";
moreMenuItems[1] = "Browse XBOX Music";
moreMenuItems[2] = "Browse XBOX Video";
moreMenuItems[3] = "XBOX Clicker";

var moreMenuItemUUIDs = new Array();
moreMenuItemUUIDs[0] = "2eebcd70-d6ae-11da-a94d-0800200c9a66"; // Shutdown XBOX
moreMenuItemUUIDs[1] = "0372b620-3083-11db-a98b-0800200c9a66"; // Browse XBOX Music
moreMenuItemUUIDs[2] = "864e3200-315e-11db-a98b-0800200c9a66"; // Browse XBOX Video
moreMenuItemUUIDs[3] = "f1705390-3165-11db-a98b-0800200c9a66"; // Clicker
[/code:1]


I have to admit, i have not written all the code myself, some of the code comes from the bundled scripts and some comes from andrew's script.
so creds goes the the writers of those scripts.



BTW, Andrew: you should maybe add this line
[code:1]
if (timestring.indexOf(":")==-1) return 0;
[/code:1]
to the top of the function TimeStringToSeconds()
to prevent the Overflow exception that otherwise is thrown if no song is being played.

Otherwise a great script from you Andrew!



XBMC-Scripts.zip
 Description:
3 Additional XBMC scripts

Download
 Filename:  XBMC-Scripts.zip
 Filesize:  4.98 KB
 Downloaded:  2224 Time(s)

Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Wed Aug 23, 2006 1:10 am    Post subject: Reply with quote

Thanks!

Best.
--
Jonas
Back to top
View user's profile Send private message Send e-mail Visit poster's website
melllvar
Newbie


Joined: 23 Mar 2007
Posts: 1

PostPosted: Fri Mar 23, 2007 11:06 pm    Post subject: Reply with quote

is it possible to get a mac version of this script? would be really great!

Or can someone tell me how to convert it myself?
Back to top
View user's profile Send private message
STOriginaL
Junior Member


Joined: 23 Nov 2006
Posts: 26

PostPosted: Mon Mar 26, 2007 1:58 am    Post subject: Reply with quote

i am also in the XBMC boat, thanks for such an awesome contribution :)
Back to top
View user's profile Send private message
Sompie
Newbie


Joined: 17 Jun 2008
Posts: 1

PostPosted: Tue Jun 17, 2008 5:48 pm    Post subject: Reply with quote

Hey

I like the script but there is something strange i only see the xbmc clicker in salling clicker and not the salling clicker remote. Do someone knows what the problem is
Back to top
View user's profile Send private message
oliviermar
Newbie


Joined: 07 Jul 2008
Posts: 4

PostPosted: Sat Jan 22, 2011 8:38 am    Post subject: same question as above: Reply with quote

why are the scripts not visible in the list of scripts in salling clicker (except "xbmc remote")

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group