PDA

View Full Version : SS/Plugin experts...help!



danny6869
2005-07-15, 11:38
I am creating a plugin, that is going to monitor remote keypresses, and when a sequence of FOUR DIGITS (where the first digit is always ZERO), then the PLAY button is keyed in, an action takes place.

The best way I can think of doing this, is by adding a callback function, and monitoring all traffic there. The problem with that is that as you are entering the 4 digits, the listing jumps all around (as the number keys are used for jumping around in lists).

The other way, I was thinking of using was, when the ZERO is pressed, I jump the client/player into a custom mode that waits for 3 digits, and the play button to be pressed, and then do my magic...this eliminates the jumping aroung in the listing, but may interfere with "NORMAL" usage!?

I'd like to know if any of you experts out there can suggest something better than what I've thought of. The goal here is to have QUICK access to pre-defined playlists/albums by entering a DISC NUMBER, and hitting play. I have everything else pretty much done...just the method of accepting the DISC NUMBER is giving me grief.

Any help is appreciated...

Danny Rego

dean
2005-07-15, 11:44
I suggest that you override an existing button to take you to the
mode, such as Sleep.
Another way to do it would be to override press-and-hold zero, which
would jump to your mode then enter any other digits.


On Jul 15, 2005, at 11:38 AM, Danny Rego wrote:

> I am creating a plugin, that is going to monitor remote keypresses,
> and when a sequence of FOUR DIGITS (where the first digit is always
> ZERO), then the PLAY button is keyed in, an action takes place.
>
> The best way I can think of doing this, is by adding a callback
> function, and monitoring all traffic there. The problem with that
> is that as you are entering the 4 digits, the listing jumps all
> around (as the number keys are used for jumping around in lists).
>
> The other way, I was thinking of using was, when the ZERO is
> pressed, I jump the client/player into a custom mode that waits for
> 3 digits, and the play button to be pressed, and then do my
> magic...this eliminates the jumping aroung in the listing, but may
> interfere with "NORMAL" usage!?
>
> I'd like to know if any of you experts out there can suggest
> something better than what I've thought of. The goal here is to
> have QUICK access to pre-defined playlists/albums by entering a
> DISC NUMBER, and hitting play. I have everything else pretty much
> done...just the method of accepting the DISC NUMBER is giving me
> grief.
>
> Any help is appreciated...
>
> Danny Rego
>

Grotus
2005-07-15, 13:02
Danny Rego wrote:
> I am creating a plugin, that is going to monitor remote keypresses, and when a sequence of FOUR DIGITS (where the first digit is always ZERO), then the PLAY button is keyed in, an action takes place.
>
> The best way I can think of doing this, is by adding a callback function, and monitoring all traffic there. The problem with that is that as you are entering the 4 digits, the listing jumps all around (as the number keys are used for jumping around in lists).
>
> The other way, I was thinking of using was, when the ZERO is pressed, I jump the client/player into a custom mode that waits for 3 digits, and the play button to be pressed, and then do my magic...this eliminates the jumping aroung in the listing, but may interfere with "NORMAL" usage!?
>
> I'd like to know if any of you experts out there can suggest something better than what I've thought of. The goal here is to have QUICK access to pre-defined playlists/albums by entering a DISC NUMBER, and hitting play. I have everything else pretty much done...just the method of accepting the DISC NUMBER is giving me grief.
>
> Any help is appreciated...
>
> Danny Rego

You could also do this with a custom map file or two. In the first map
file you have 0 mapped to changeMap_othercustommap
In the othercustommap file you have the number keys mapped to
modefunction_yourmode->yournumberfunction

This way you stay in the current mode so that the display doesn't
change, but you don't have the callback function to mess with.

In a related note, this gave me the idea to add a function to add custom
maps without needing an actual file to back them up (pretty much just
for plugins). The end-user would still need to change their irmap
preference, but at least plugin authors wouldn't have to supply .map
files. Maybe also a function to add to an existing custom map as long
as there aren't conflicts.

Lots to think about there.

takashi37
2005-07-15, 22:33
Danny Rego wrote:[color=blue]

You could also do this with a custom map file or two. In the first map file you have 0 mapped to changeMap_othercustommap

In the othercustommap file you have the number keys mapped to
modefunction_yourmode->yournumberfunction


That's genius.

Is there a way to call a changemap back to the first map file after the numberfunction?

TL

Dave D
2005-07-16, 04:45
That's genius.


I agree! Grotus, where did you find out about changeMap (and other possible remote mapping features which don't currently appear in the Default.map)?

Thanks, Dave

Grotus
2005-07-17, 10:19
Dave D blurted out:
> takashi37 Wrote:
>
>>That's genius.
> I agree! Grotus, where did you find out about changeMap (and other
> possible remote mapping features which don't currently appear in the
> Default.map)?

I wrote them. I put a bunch of stuff like that in there, but they
aren't all that user friendly, so they remain unadvertised.

Grotus
2005-07-17, 10:22
takashi37 blurted out:
> That's genius.
>
> Is there a way to call a changemap back to the first map file after the
> numberfunction?

All changeMap really does is tweak the irmap preference. So part of the
function could do that to get back to the original. I should probably
make a slightly different changeMap function to make it easier to
remember the original value.