Originally Posted by dalto
It is better to use aliases. For a couple of reasons. The biggest one is in an environment when you are doing IR routing. When you use aliases it will use the correct routing to send the IR signals to the correct device. If you drop the code directly it will route it to the current device which is rarely what you want. The other reason is that it provides a small of amount of abstraction allowing you to have the IR code in a single place so if you want to change it you easily can.
Alias creation is a lot faster in the "functions" view. You can open all the commonly used devices at once and just directly click what you want.
You can also alias macros in other macros so if you find yourself doing the same thing over and over again create a macro and call it from other macros. For example, I usually create a macro that turns the devices on which I call from every "activity" as you describe them above.
What exactly is IR routing? I am using a MRF-260 with blasters; are you saying that an IR command dropped into a "device" that isn't setup to go through the MRF will get shot from the remote's nose instead? I had no idea this was the case, I'm happy / lucky that I didn't do things the other way and run into this because I probably would've banged my head on the wall for an hour before I realized what was going on.
On my 1200, each "activity" is actually a "device" in CCP-speak. I use punch-through to get the volume over to the receiver, and everything else falls through to whatever the actual "device" in use is (TiVo, Xbox, etc). I punch through the main power button to the main Activities ("MAIN" - you can replace the buttons on the 1200) screen, and I have a macro that shuts everything off from there, but it does it by aliasing to the commands on the actual device entries themselves.
On the Activities screen, each softkey for each activity manages powering on the devices it requires and shutting off everything else, so whenever you change activities it turns off the unneeded stuff. The only device I don't have discrete power for is the stupid Tivo Roamio. (They have a "sleep" command but that will also wake it up so you can't fire it multiple times.)
On my "Devices" button, I have softkeys that simply take you to each individual device, and those have their own softkeys for any buttons the remote doesn't supply. I don't use punchthrough there, so that way I can get the d-pad to control the TV temporarily if I need to. Hitting Activities then tapping the "current" activity (I store it in a variable) will jump you right back to that customized soft-screen and the normal key scheme for that activity without re-triggering all of the other macro garbage to power off unused devices/etc. It ends up working very similarly to how Logitech Harmony remotes work, which is what my wife is used to since that's what we had before URC. (The build quality on the Logitechs was so bad, and their software got to be such garbage... I love the control with URC, even if it is a bit more work to setup in some cases.)
If you'd like to see the file, here it is on MS OneDrive
I probably could optimize things a bit more by putting some of the repetitive stuff into other macros, but the remote doesn't seem to be running slow or hurting for memory (I don't have all that much gear in the living room), so I haven't bothered.
I might have some cruft in my off macro - I was using an Onkyo receiver that did not allow you to disable power commands via HDMI-CEC, so I had to omit it from some of the power routines (otherwise it kept turning itself back on because the TV was still on, no matter what order I sent the commands, very frustrating). I left myself a "note" via an unused variable in at least one of the macros so I remembered that it wasn't supposed to be in there.
Now I'm on a Denon X3200 and it can ignore CEC power commands, so it is now controlled by the remote again, but I might have forgotten to remove the "note."