FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Silly reference question

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


Joined: 15 Jan 2008
Posts: 3

PostPosted: Tue Jan 15, 2008 6:44 pm    Post subject: Silly reference question Reply with quote

So, just downloaded and purchased, love the program so far, but I want to get into the scriping. I've read through the API, looked at some of the existing scripts, but, I can't for the life of me seem to understand what calls can be made once I get an object back from a call like CreateMediaPlayerScreen.

Foreexample, there's the Update function that can get called, and it's updated every so often...there's the KeyDown function for the CreateKeyboardScreen call, and I just don't know where these are coming from. Which ones do I have available? does this make sense?

For example:
mediaPlayer = CreateMediaplayerScreen( "myMediaPlayer_");

//then I define a function to take advantage of the 'update' property.
function myMediaPlayer_Update(){
var i = 1+1;
}
Back to top
View user's profile Send private message
firephreek
Newbie


Joined: 15 Jan 2008
Posts: 3

PostPosted: Wed Jan 16, 2008 4:49 am    Post subject: still looking Reply with quote

and I haven't figured it out, though, re-reading the above, I think I mean to say the 'event' and not the 'property'. That's what I'm looking for, right?

The defined function (myMediaPlayer_Update) in the above example is a combination of the my object name (as a prefix) appended by the Salling Clicker Event it's supposed to respond to, right? So, where can I find out about these events and which ones I can expect/take advantage of? and what parameters they need?

function myMediaPlayer_KeyDown....
function myMediaPlayer_Update...
function myMediaPlayer_SillyFace....
function myMediaPlayer_bsod...
Back to top
View user's profile Send private message
firephreek
Newbie


Joined: 15 Jan 2008
Posts: 3

PostPosted: Sat Jan 26, 2008 5:52 pm    Post subject: nobody? Reply with quote

Almost 100 views and nobody can answer this question? I'm starting to wonder if I should've purchased this program. :-( Not because I'm not getting help, but because I don't know if I'm going to be able to script it the way I really need to. Somebody, just point me to an API or RFC to find out how and where these events are being generated, per favore
Back to top
View user's profile Send private message
salling
Site Admin


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

PostPosted: Sun Feb 03, 2008 7:50 pm    Post subject: Reply with quote

I think you're pretty much spot-on in your observations so far. For further understanding, I recommend checking these resources out:

http://www.salling.com/forums/viewtopic.php?t=2930
(very basic; perhaps too basic)

http://www.salling.com/Clicker/windows/APIDocs/html/index.html
(describes properties, not the "events" you're asking about)

For "mediaplayer" object events, here are the ones you'll find used in the iTunes controller script:

function mediaPlayer_Update(theScreen)
function mediaPlayer_ValueUpdated(theScreen, property)
function mediaPlayer_Exit(theScreen)
function mediaPlayer_KeyDown(theScreen, theKey)
function mediaPlayer_KeyRepeat(theScreen, theKey)
function mediaPlayer_KeyUp(theScreen, theKey)

Where:

theScreen = the widget object sending the event (usually, you'd know what object this is already, as you control what widgets will use this callback function)

theKey = a string representing the a key on the device

property = { None = 0, Value = 1, ListeningVolume = 2, SelectedItem = 3, PlayheadPosition = 4 }

--

I really recommend you check out the scripts that come with the product; the source code is there for you to inspect (right-click and select Open), and it does something useful (which is not always true for contrived sample/tutorial code).

Best of luck!
--
Jonas
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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