Your Universal Remote Control Center
RemoteCentral.com
Complete Control by URC Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
MX780 IF/THEN/ELSE
This thread has 11 replies. Displaying all posts.
Post 1 made on Saturday April 20, 2013 at 11:36
Lamblin Entertainment
Long Time Member
Joined:
Posts:
August 2011
18
Just had opportuniity to work on first MX780, and stumped on testing Variables without an if/then/else process.

One quick pointer or brief example is all I need, to get me past what for now seems to be deadends with all my efforts.

How does one branch on a Var state?

Thanks.
theGadgetGuy
Post 2 made on Saturday April 20, 2013 at 11:48
JoeFlabitz
Select Member
Joined:
Posts:
December 2008
1,517
Not possible with a MX-780- only the basic True/False variables.

It is available in the MX-890!
Post 3 made on Saturday April 20, 2013 at 11:53
Duct Tape
Loyal Member
Joined:
Posts:
November 2008
5,299
You can nest true/false variables from other buttons.
[Link: facebook.com]
OP | Post 4 made on Saturday April 20, 2013 at 13:05
Lamblin Entertainment
Long Time Member
Joined:
Posts:
August 2011
18
I've set variables without any issues, but once set how can they be tested for True/False?

If I can achieve that, then I'm good to go.
theGadgetGuy
Post 5 made on Saturday April 20, 2013 at 13:13
Duct Tape
Loyal Member
Joined:
Posts:
November 2008
5,299
At the bottom of the macro window, change macro type to variable.  The macro window turns into two macro windows.  One for true, and another for false.
[Link: facebook.com]
OP | Post 6 made on Saturday April 20, 2013 at 14:36
Lamblin Entertainment
Long Time Member
Joined:
Posts:
August 2011
18
Roger. Thanks, but I was already was aware of that. Sorry I wasn't clear.

I have not been able to figure out how to use that macro window to test and act upon a variable.

In essence what I am attempting to do is to return to an Activity if the user has gone to the Devices (Main2) pages for more device commands.

I want to design a macro for the "PREV CH" key that returns from the Device page back to the Activity page that called it.
theGadgetGuy
Post 7 made on Saturday April 20, 2013 at 16:20
Duct Tape
Loyal Member
Joined:
Posts:
November 2008
5,299
Im pretty sure this can be done, i'm not in front of my pc right now though.  When i am, i will work up a sample file so you can see how i would do it.  
[Link: facebook.com]
OP | Post 8 made on Saturday April 20, 2013 at 17:26
Lamblin Entertainment
Long Time Member
Joined:
Posts:
August 2011
18
Thanks DuctTape.

I have set the 5 Activity variables up to be true/false when an Activity is started.

I just need to figure out how to test now as I exit a Device screen to go back to the proper Activity.

I appreciate your help and look forward to learning more.

This is the first time I've been stumped in any CCP programming effort.
theGadgetGuy
Post 9 made on Sunday April 21, 2013 at 09:47
BobL
Founding Member
Joined:
Posts:
March 2002
1,352
Have you tried the navigate- in the jump command of the macro? I don't know if it works from one of the 'main' pages but shoukd work if you jump to a device.
Post 10 made on Monday April 22, 2013 at 09:00
danieljanderson
Long Time Member
Joined:
Posts:
November 2004
219
On April 20, 2013 at 14:36, Lamblin Entertainment said...
Roger. Thanks, but I was already was aware of that. Sorry I wasn't clear.

I have not been able to figure out how to use that macro window to test and act upon a variable.

In essence what I am attempting to do is to return to an Activity if the user has gone to the Devices (Main2) pages for more device commands.

I want to design a macro for the "PREV CH" key that returns from the Device page back to the Activity page that called it.

If I understand correctly, I don't think you would need any variables.

On each device page, for the PREV CH key, just have a page jump back to the appropriate Activity.

If they are on the DVD device page, there should be no doubt that they want to go back to the DVD activity page.
OP | Post 11 made on Monday April 22, 2013 at 11:24
Lamblin Entertainment
Long Time Member
Joined:
Posts:
August 2011
18
On April 22, 2013 at 09:00, danieljanderson said...
If I understand correctly, I don't think you would need any variables.

On each device page, for the PREV CH key, just have a page jump back to the appropriate Activity.

If they are on the DVD device page, there should be no doubt that they want to go back to the DVD activity page.

Thanks for the idea, but in general that won't work. For instance from Watch DVD the user could go to the AV Receiver device, and since allmost all Activities use the AV Rcvr, there is no way to determine what the last activity might have been without having set a return flag via Variables.

That said, I now have everything working exactly as desired.

For others reading this post, the approach was to . . .

1) Create a hidden page that contained six Independant Var Macros (one for each of the 6 possible Activities). Each of these macros are of Type Var (versus normal or hold) and only have a single line of code which defines the TRUE action for the Var. For example, If the SAT Variable is True, Jump to Watch Satalite/Page 1.

Thus when SAT is true the screen will return to the Watch Satelite Activity.

2) Define a "Return Jump" Normal Type macro (eg, RTNACT) on a hidden page which contains multiple lines of code, each code line Aliased to each of the above noted Set VAR macros. When this macro is executed it will cause a Jump to the Activity whose Var is true. Obviously since this Return macro has a jump for each of the Activities, it will only work if one and only one Var, out of the multiple entries in the list, is True.

3) Define a Normal Macro (CLRVARS) which contains (in my case) six entries, each of which Sets one of the VARs to False. This macro thus clears all Vars to assure a default state.

4) When an Activity is started, execute the CLRVARS macro, then set the Activity's associated VAR to True. Conversely when an Activity is terminated, execute the CLRVARS macro to reset any and all VARs.

5) Define a Device key (hard or soft) to cause a return to the prior (Calling) Activity. This key will have a single macro entry aliased to the (eg) RTNACT macro. Since only the Var for the calling Activity will be true, that is the only line of code that will pass the true test and cause a return to its associated Activity.

It all sounds more complicated than it really was to create. It works as desired. I used the CH PREV hard button in the Device pages to return to the calling Activity.

Since only the DSS Satalite Receiver used that hard key, I assigned the CH PREV function to a soft key so it could be accessed, if desired.
theGadgetGuy
OP | Post 12 made on Saturday April 27, 2013 at 20:54
Lamblin Entertainment
Long Time Member
Joined:
Posts:
August 2011
18
On April 22, 2013 at 11:24, Lamblin Entertainment said...
That said, I now have everything working exactly as desired.

Just wanted to say "Thanks" to all of you that posted comments to this thread. While no single one of them "solved" the issue for me, in aggregate, all together they gave me the clues to succeed.

Much thanks to all!
theGadgetGuy


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse