FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Winamp (take II) scripting notes

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


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

PostPosted: Tue Nov 08, 2005 2:04 am    Post subject: Reply with quote

Okay. No, I'm not using the medialibrary directly in the update()-handler, but I'm not sure what the dependencies are in ActiveWinamp.

If you could try commenting out lines in the try-block in my update() handler until you no longer get the error, we'd find out.

I'd love to be able to better document what's required for this script to work; it's pretty cool, actually. ;-)

We can compare plugin lists tomorrow. Off to bed now.

Cheers.
--
Jonas
Back to top
View user's profile Send private message Send e-mail Visit poster's website
teetow
Senior Member


Joined: 11 Oct 2005
Posts: 72
Location: Uppsala, Sweden

PostPosted: Tue Nov 08, 2005 2:47 am    Post subject: Reply with quote

[quote="salling"]If you could try commenting out lines in the try-block in my update() handler until you no longer get the error, we'd find out.[/quote]
I think I might have found something.
[code:1]var songRow = null;
// snip

function mykeypad_Update( theScreen )
{
try {
if( songRow != null ) songRow.textualContent = mediaItem.Title;
// snip //
} catch( e ) {
if( songRow != null ) songRow.textualContent = "Lost contact with Winamp";
}
}[/code:1]
It seems to me that songRow etc. isn't actually set anywhere, since the if-clause will always evaluate to false. Could it be that simple, or did I overlook anything?
Back to top
View user's profile Send private message
salling
Site Admin


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

PostPosted: Tue Nov 08, 2005 11:27 am    Post subject: Reply with quote

Genious!

I shall look this over once again.

- jonas
Back to top
View user's profile Send private message Send e-mail Visit poster's website
salling
Site Admin


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

PostPosted: Tue Nov 08, 2005 11:50 am    Post subject: Reply with quote

EDIT: I've posted an update to the script in the "Clicker for Windows" area:

http://www.salling.com/forums/viewtopic.php?t=3065

----

Hm. I actually cannot find any problems with the songRow stuff.

1. It is set to null to begin with
2. Every time it's accesses, we check if it's != null.
3. It is set in launchWidget()

Right?

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


Joined: 11 Oct 2005
Posts: 72
Location: Uppsala, Sweden

PostPosted: Tue Nov 08, 2005 4:11 pm    Post subject: Reply with quote

[quote="salling"]1. It is set to null to begin with
2. Every time it's accesses, we check if it's != null.
3. It is set in launchWidget()[/quote]Right, I thought "" was considered null in JScript. Sorry about that.

Well, then I'm out of ideas. Gonna keep hacking tonight.
Back to top
View user's profile Send private message
salling
Site Admin


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

PostPosted: Tue Nov 08, 2005 5:18 pm    Post subject: Reply with quote

Try getting the "full" version of Winamp. The "lite" version is a bit too boring for scripting. Hopefully, that'll rectify the problem.

Best.
--
Jonas

[quote="teetow"][quote="salling"]1. It is set to null to begin with
2. Every time it's accesses, we check if it's != null.
3. It is set in launchWidget()[/quote]Right, I thought "" was considered null in JScript. Sorry about that.

Well, then I'm out of ideas. Gonna keep hacking tonight.[/quote]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
teetow
Senior Member


Joined: 11 Oct 2005
Posts: 72
Location: Uppsala, Sweden

PostPosted: Tue Nov 08, 2005 6:46 pm    Post subject: Reply with quote

[quote="salling"]Try getting the "full" version of Winamp. The "lite" version is a bit too boring for scripting. Hopefully, that'll rectify the problem.[/quote]Yeah, unfortunately I think my user profile is quite common (at least among anti-bloat fanatics such as myself), so it'd be nice to get some light shed on exactly what happens when you don't have the media library add-on. For example, if I paste the "playlist.mediaItem.Track" code into my own ActiveWinamp script, I actually get the track name.

Anyway, I haven't yet tried your updated version. I'm positive I can hack something up. I'm hoping to at least concoct a playlist browser (jump directly to a named track), which is more than what can be done without ActiveWinamp.

While I'm not sure if it's a wise idea to merge these scripts into one (probably too much redundancy) I'd say the goal is to get the most out of each platform (basic Winamp / basic Winamp + ActiveWinamp / Full Monty Winamp + ActiveWinamp). I'd be happy to maintain the "crippled" script, using yours as a template.
Back to top
View user's profile Send private message
salling
Site Admin


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

PostPosted: Tue Nov 08, 2005 6:49 pm    Post subject: Reply with quote

You're welcome to go ahead and clone the script, as long as you change the UUID.

With ActiveWinamp, though, one can do seriously cool stuff. :-) I've had a blast playing with it.

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


Joined: 15 Oct 2005
Posts: 27
Location: Všnersborg, Sweden

PostPosted: Thu Nov 10, 2005 1:29 pm    Post subject: Reply with quote

Perhaps you can include this winamp plugin in the salling clicker installation later on? So we don't need to go around everywhere looking for stuff :P
Back to top
View user's profile Send private message MSN Messenger
salling
Site Admin


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

PostPosted: Thu Nov 10, 2005 2:04 pm    Post subject: Reply with quote

Possibly. I've looked into re-distributing the plugin, and Shane's quite cool with that.

Did you try it out, though? How do you like it?

Best.
--
Jonas

[quote="Smeagol"]Perhaps you can include this winamp plugin in the salling clicker installation later on? So we don't need to go around everywhere looking for stuff :P[/quote]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Smeagol
Junior Member


Joined: 15 Oct 2005
Posts: 27
Location: Všnersborg, Sweden

PostPosted: Thu Nov 10, 2005 11:49 pm    Post subject: Reply with quote

No, still waiting for money to roll in so i can buy the stuff i need >_<
Back to top
View user's profile Send private message MSN Messenger
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