You could set a variable with each screen change and then use the BYVAR for your command.
I'm using a Fusion Brain to send commands like Play,Vol-,GPS etc generated by my steering wheel controls to RoadRunner.
What I would like is Fusion to send generic commands like MODE,MODE_HOLD, TRKDOWN, etc and have RoadRunner take the appropriate action. For example, while on the GPS screen I would like TRKUP to zoom out, but on the main screen it should change tracks.
Is it possible to do this using /defines as each screen loads?
In gps_external.skin have /define TRKDOWN "ZOOM+"
in menu.skin have /define TRKDOWN "NEXT"
then call #TRKDOWN# from my Fusion code?
Or should this be handled by an EVAL command and a strcomp() with RRScreen? I need some help as to how this command would look.
Thanks for any input and for reading,
You can make a screen specific commands in ExecTBL.ini like so:
Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2
I highly recommend the EXECTBL approach like Sal suggested - it's quite simple and very powerful as it allows you to execute different things not only based on which SCREEN you are in, but also based on WHAT you're using (radio/audio/xm etc) -- plus it will work on ANY skin. You can also combine the ExecTBL approach with a variable as well, or just use a BYVAR in exectbl to execute the specific command based on the activesourceid info. Thunder's suggestion works too, but it's probably a better solution for few changes on different screens of the same skin only.
Thanks for the help guys!
ExecTBL.ini was definitely the way to go here. An example: when holding 'mode' fusion will send FUSION_MODE_HOLD and my exectbl looks like this:
When I hold mode in any screen it flips to my GPS, when held in GPS it flips back to the previous screen.Code:"FUSION_MODE_HOLD","LASTSCR",EXTERNAL_GPS.skin "FUSION_MODE_HOLD","GPS"