macro questions
Moderator: Moderators
macro questions
I have a 2117 remote and have a couple of macro and keymove questions
1. How do I make a macro global vs. device specific or visa versa?
2. Can macros be within macros?
3. Can phantom keys be made into a macro themselves and then put in a macro?
4. Can keymoves be made global?
I have tried the extender route and I am taking a break- my brain is starting to hurt.
I have tried the above with no success and I just dont know how to do #1, at least if it can be done. Thanks for your help, Doug
Sorry, I just noticed this post is in the extender area and not the beginner- It can be moved if necc- thanks
1. How do I make a macro global vs. device specific or visa versa?
2. Can macros be within macros?
3. Can phantom keys be made into a macro themselves and then put in a macro?
4. Can keymoves be made global?
I have tried the extender route and I am taking a break- my brain is starting to hurt.
I have tried the above with no success and I just dont know how to do #1, at least if it can be done. Thanks for your help, Doug
Sorry, I just noticed this post is in the extender area and not the beginner- It can be moved if necc- thanks
Last edited by just4fn on Sat Nov 29, 2003 3:08 am, edited 2 times in total.
thanks, just4fn
-
usblipitor
- Posts: 516
- Joined: Fri Oct 10, 2003 10:06 pm
- Location: Greenbelt, MD
Re: macro questions
Doug,just4fn wrote:How do I make a macro global vs. device specific or visa versa?
The experts may know a better way, but in the Special Protocols folder at yahoo-JP1 is a Device Specific Macro protocol.
May the force be with you.
What were you still having problems with on the extender? When I looked at your dump, it looked like as soon as you changed your Power Macro from 'Power = DEV_TV; Power' to 'Power = DEV_TV; Shift-Power' to stop the recursion, it would have worked.
In any event, here are the answers to your questions:
Generally, the best way to learn is to try. You won't break anything if you try to create nested macros w/ IR. They just won't work.
Good luck! I hope you get things working the way you want. Of course I'm a little partial to the Extender.
David
In any event, here are the answers to your questions:
Use the Device Specific Macro special protocol as described above.1. How do I make a macro global vs. device specific or visa versa?
Only when using an Extender.2. Can macros be within macros?
Since this would be a special case of #2, you can only do it w/ an Extender too.3. Can phantom keys be made into a macro themselves and then put in a macro?
No. Keymoves are device specific, macros are global. You would simply create a Macro with a length of 1, which could reference a Phantom key.4. Can keymoves be made global?
Generally, the best way to learn is to try. You won't break anything if you try to create nested macros w/ IR. They just won't work.
Good luck! I hope you get things working the way you want. Of course I'm a little partial to the Extender.
David
You'd need an extender and macro of length 2, because you need the first command of the macro to do a temporary switch to the device mode in which the keymove is bound to that phantom key.vasqued2 wrote:No. Keymoves are device specific, macros are global. You would simply create a Macro with a length of 1, which could reference a Phantom key.4. Can keymoves be made global?
Read the documentation for that specific extender to find out how to do temporary device mode switches. IIRC in the extender discussed in this thread a temporary device mode switch is the first step of a non temporary device mode switch, you just leave out the second step.
ok, I tried the extender again. And I put in the line just like you said. power = dev_tv; shifted power- and it works- it turns on the tv. I tried it 1st without the shifted power and it doesnt turn on the TV This is the big hurdle I am having. Before the extender, it was logical how to make a macro. With the extender I dont understand Why it would need in your example, shifted power at the end? I need to understand the format or why the keys are in the order they are to make my macros work. I have read the documentation, I must be missing something- my brain hurts- thanks, Doug
I just went back and read the post after my letter of my remote dump. I now think I understand why the power works with shifted power, but why shift-power? How would I have known to use that key? Why not any other key like 1 instead of shift power to stop? Do these keys have special powers?
Could you give me an example to turn the tv on and change the channel to channel 3 and the device to SAT? This may be a big help if I can understand the example- Thanks , Doug
I just went back and read the post after my letter of my remote dump. I now think I understand why the power works with shifted power, but why shift-power? How would I have known to use that key? Why not any other key like 1 instead of shift power to stop? Do these keys have special powers?
Could you give me an example to turn the tv on and change the channel to channel 3 and the device to SAT? This may be a big help if I can understand the example- Thanks , Doug
thanks, just4fn
-
Mark Pierson
- Expert
- Posts: 3020
- Joined: Sun Aug 03, 2003 12:13 am
- Location: Connecticut, USA
- Contact:
While I'm not very familiar with the 2116/2117 extender, I believe it uses the concept of "shift cloaking". In your example, the remote looks for a Key Move on the TV device (or a Macro) for Shift-Power. When it doesn't find one, it invokes the Power function from the TV setup code.just4fn wrote:but why shift-power?
That would look something like:Could you give me an example to turn the tv on and change the channel to channel 3 and the device to SAT?
power = dev_tv; shift-power; 0; 0; 3; dev_sat
That enables the TV device, sends Shift-Power (using the actual TV setup code Power function), sends "003" to the TV (the macro is still in TV mode; you could use "0; 3" if your TV uses 2-digit channel selection, or "0; 3; Enter" if it doesn't), and finally sets the active device to SAT. Subsequent key presses will be for the SAT device.
Mark
I was under the impression DEV_SAT just set the active device to SATMark Pierson wrote:power = dev_tv; shift-power; 0; 0; 3; dev_sat
...
and finally sets the active device to SAT. Subsequent key presses will be for the SAT device.
within the macro and if you wanted the buttons bound, you'd need to
call a bunch fo SET_[TRANS|VOL|ETC]_KEYS, which would mean
appending Phantom1 after DEV_SAT (unless Phantom1 had been changed
or removed from the default)
power = dev_tv; shift-power; 0; 0; 3; dev_sat; phantom1
Most TV's aren't ready for another command right after they turn on, so the macro Mark suggested probably won't work. You need to add some sort of delay after you send the command to turn the TV on and before the command to change the channel.
It's worth trying Mark's way first (there may be some TV's on which it would work). If it fails, you need to experiment with added delay to see how much your TV needs.
It's worth trying Mark's way first (there may be some TV's on which it would work). If it fails, you need to experiment with added delay to see how much your TV needs.
-
Mark Pierson
- Expert
- Posts: 3020
- Joined: Sun Aug 03, 2003 12:13 am
- Location: Connecticut, USA
- Contact:
You may be right since I've never used the extender myself. If that's indeed how it operates, and your phantom1 is setup to do those steps, then what you suggest should work.sfhub wrote:I was under the impression DEV_SAT just set the active device to SAT within the macro and if you wanted the buttons bound, you'd need to call a bunch fo SET_[TRANS|VOL|ETC]_KEYS
Mark
You will have to add the SET_xxx_KEYS at the end of the macro after the DEV_SAT command.
As long as you haven't changed the definition of the macro on phantom1 from what you posted above, you can add the phantom1 to the end of the macro to set all of the keys to DEV_SAT.
Now, an explanation of what is happening...
First, why didn't the macro work when I used the Power button in it?
Unlike an unextended remote which protects you from doing bad things, an extender gives you a lot of freedom- enough to hang yourself with. Unfortunately that is what you did.
As you've found out, an unextended remote doesn't allow you to use nested macros. An extended remote does.
So when you set up a macro on the Power key = DEV_TV; Power. The first thing the extender did was process the DEV_TV command and set the mode to TV. Then it went to process the Power button. When it started to process it, it essentially said, "Hey, there's a macro defined for the Power button, let me process that." At which point it processed the DEV_TV again and then went to process the Power button in the macro. At which point it said, "Hey, there's a macro defined for the Power button, let me process it", and you get the idea. Essentially, it just kept looping and never stopped.*
Your mistake is pretty common w/ extenders and it's easy to make. You have to be very careful with how you set up your macros or you can easily get into these types of loops.
So your next question is why do I use the Shift-Power?
Obviously, based on the above, you can't use the Power key. So your first option would be to create a Keymove for Power, put it on another button (or a phantom button), and reference that in your macro. A second option is to use what is called shift-cloaking. With shift cloaking, if you have a macro or keymove assigned to a shifted version of a button, it will perform whatever macro or keymove is assigned. If there isn't a keymove or macro assigned, the extender will perform the function associated w/ that unshifted-button w/o looking for keymove or macro first. So, in the example above, it would look for a keymove and macro on the Shift-Power button, not find any, and then process the unshifted-Power button. Thus avoiding the looping problem above.
Overall, macros behave a process the same as an unextended remote, you just have to be careful not to create loops that you can't get out of.
David
* OK, it really would stop eventually, but for this purpose it's easiest to think of it as looping forever.[/quote]
As long as you haven't changed the definition of the macro on phantom1 from what you posted above, you can add the phantom1 to the end of the macro to set all of the keys to DEV_SAT.
Now, an explanation of what is happening...
First, why didn't the macro work when I used the Power button in it?
Unlike an unextended remote which protects you from doing bad things, an extender gives you a lot of freedom- enough to hang yourself with. Unfortunately that is what you did.
As you've found out, an unextended remote doesn't allow you to use nested macros. An extended remote does.
So when you set up a macro on the Power key = DEV_TV; Power. The first thing the extender did was process the DEV_TV command and set the mode to TV. Then it went to process the Power button. When it started to process it, it essentially said, "Hey, there's a macro defined for the Power button, let me process that." At which point it processed the DEV_TV again and then went to process the Power button in the macro. At which point it said, "Hey, there's a macro defined for the Power button, let me process it", and you get the idea. Essentially, it just kept looping and never stopped.*
Your mistake is pretty common w/ extenders and it's easy to make. You have to be very careful with how you set up your macros or you can easily get into these types of loops.
So your next question is why do I use the Shift-Power?
Obviously, based on the above, you can't use the Power key. So your first option would be to create a Keymove for Power, put it on another button (or a phantom button), and reference that in your macro. A second option is to use what is called shift-cloaking. With shift cloaking, if you have a macro or keymove assigned to a shifted version of a button, it will perform whatever macro or keymove is assigned. If there isn't a keymove or macro assigned, the extender will perform the function associated w/ that unshifted-button w/o looking for keymove or macro first. So, in the example above, it would look for a keymove and macro on the Shift-Power button, not find any, and then process the unshifted-Power button. Thus avoiding the looping problem above.
Overall, macros behave a process the same as an unextended remote, you just have to be careful not to create loops that you can't get out of.
David
* OK, it really would stop eventually, but for this purpose it's easiest to think of it as looping forever.[/quote]
Ok, I just about have the remote how I want it. I put phantom 1 at the end of DEV_SAT to make the remote change to my sat device. I noticed the vpt wasnt working so I made a phantom key without set_vol_keys and inserted it in place of phantom 1 at the end of the macro. All is good.
I was having alot of trouble because I had assinged phantom keys in km.exe in the tv and a couple of other choices that I think was playing havoc with the remote.
My next challenge will be to assign proper lcd names on the remote.
Thanks for the help, Doug
P.S. My wife thinks I'm crazy spending all this time on a remote. but I find it challenging and like a puzzle.
I was having alot of trouble because I had assinged phantom keys in km.exe in the tv and a couple of other choices that I think was playing havoc with the remote.
My next challenge will be to assign proper lcd names on the remote.
Thanks for the help, Doug
P.S. My wife thinks I'm crazy spending all this time on a remote. but I find it challenging and like a puzzle.
thanks, just4fn
-
Mark Pierson
- Expert
- Posts: 3020
- Joined: Sun Aug 03, 2003 12:13 am
- Location: Connecticut, USA
- Contact:
-
usblipitor
- Posts: 516
- Joined: Fri Oct 10, 2003 10:06 pm
- Location: Greenbelt, MD
The extender comes with a special protocol to set the LCD.usblipitor wrote:How does one do this again? In the .rdf file there is a section called [DeviceButtons] .. does one just edit the file and change the name VCR to TiVo (or RePlayTV) ? How many letters can one use?just4fn wrote:My next challenge will be to assign proper lcd names on the remote.
You invoke the special protocol by defining a keymove for a placeholder
device which uses the special protocol. The hex data for the keymove
defines what the LCD screen should display.
You can do 5 chars on line1 and 4 chars on line2 of the LCD.