- Posts: 443
- Thank you received: 36
Nested macros?
- Nillaz
- Topic Author
- Away
- User
-
Less
More
2 years 2 months ago #2548
by Nillaz
Nested macros? was created by Nillaz
Forgive me if this is a stupid question, but is it possible to call a user defined macro from within a macro, and if so what does the syntax for that look like?
Please Log in to join the conversation.
- bowlingbeeg
- Offline
- User
-
Less
More
- Posts: 248
- Thank you received: 33
2 years 2 months ago #2549
by bowlingbeeg
Replied by bowlingbeeg on topic Nested macros?
It's just the name of the macro.
Macro|
AV|1~Power~On!
mymacro.theater!
Macro|
AV|1~Power~On!
mymacro.theater!
Please Log in to join the conversation.
- Nillaz
- Topic Author
- Away
- User
-
Less
More
- Posts: 443
- Thank you received: 36
2 years 2 months ago #2550
by Nillaz
Replied by Nillaz on topic Nested macros?
lol Well I feel dumb. Thanks for the info!
Please Log in to join the conversation.
- Fattykidd
- Offline
- User
-
Less
More
- Posts: 150
- Thank you received: 3
1 year 8 months ago #3627
by Fattykidd
Replied by Fattykidd on topic Nested macros?
I'm trying to figure out the correct syntax for my power macros.
Below is my coreelec power on macro. Can anyone have a look and help me out. Thanks in advance.
macro|AV|139~Power~On!loadscene|loading!If|IsEQ##{{av_134_power}}##false##Macro|Lighting|33~Level~65!Lighting|35~On!AV|134~Power~On!Pause|10!AV|134~Source~SAT/CBL!Pause|18!AV|130~Home!Pause|6!!##Macro|AV|134~Source~SAT/CBL!Pause|8!AV|130~Home!!loadscene|watchcoreelec
Below is my coreelec power on macro. Can anyone have a look and help me out. Thanks in advance.
macro|AV|139~Power~On!loadscene|loading!If|IsEQ##{{av_134_power}}##false##Macro|Lighting|33~Level~65!Lighting|35~On!AV|134~Power~On!Pause|10!AV|134~Source~SAT/CBL!Pause|18!AV|130~Home!Pause|6!!##Macro|AV|134~Source~SAT/CBL!Pause|8!AV|130~Home!!loadscene|watchcoreelec
Please Log in to join the conversation.
- bowlingbeeg
- Offline
- User
-
Less
More
- Posts: 248
- Thank you received: 33
1 year 8 months ago - 1 year 8 months ago #3629
by bowlingbeeg
Replied by bowlingbeeg on topic Nested macros?
I've found that nesting macros is more difficult then it should be. The outer macro commands needs the extra !'s and not the inner ones. I decided that any place I needed to nest macro commands I would just create a new global macro and call it. I think this is what your macro should be(I added spacing to help show the levels of nesting):
macro| AV|139~Power~On!!
loadscene|loading!!
If|IsEQ##{{av_134_power}}##false##
Macro|
Lighting|33~Level~65!
Lighting|35~On!
AV|134~Power~On!
Pause|10!
AV|134~Source~SAT/CBL!
Pause|18!
AV|130~Home!
Pause|6##
Macro|
AV|134~Source~SAT/CBL!
Pause|8!
AV|130~Home!!
loadscene|watchcoreelec!!
or if you were to create two macros like coreelec.poweron and coreelec.alreadyon then it would look like this which is much easier to read/understand:
macro|
AV|139~Power~On!!
loadscene|loading!!
If|IsEQ##{{av_134_power}}##false##coreelec.poweron##coreelec.alreadyon!
loadscene|watchcoreelec!!
where coreelec.poweron is:
Macro|
Lighting|33~Level~65!
Lighting|35~On!
AV|134~Power~On!
Pause|10!
AV|134~Source~SAT/CBL!
Pause|18!
AV|130~Home!
Pause|6!
and coreelec.alreadyon is:
Macro|
AV|134~Source~SAT/CBL!
Pause|8!
AV|130~Home!
macro| AV|139~Power~On!!
loadscene|loading!!
If|IsEQ##{{av_134_power}}##false##
Macro|
Lighting|33~Level~65!
Lighting|35~On!
AV|134~Power~On!
Pause|10!
AV|134~Source~SAT/CBL!
Pause|18!
AV|130~Home!
Pause|6##
Macro|
AV|134~Source~SAT/CBL!
Pause|8!
AV|130~Home!!
loadscene|watchcoreelec!!
or if you were to create two macros like coreelec.poweron and coreelec.alreadyon then it would look like this which is much easier to read/understand:
macro|
AV|139~Power~On!!
loadscene|loading!!
If|IsEQ##{{av_134_power}}##false##coreelec.poweron##coreelec.alreadyon!
loadscene|watchcoreelec!!
where coreelec.poweron is:
Macro|
Lighting|33~Level~65!
Lighting|35~On!
AV|134~Power~On!
Pause|10!
AV|134~Source~SAT/CBL!
Pause|18!
AV|130~Home!
Pause|6!
and coreelec.alreadyon is:
Macro|
AV|134~Source~SAT/CBL!
Pause|8!
AV|130~Home!
Last edit: 1 year 8 months ago by bowlingbeeg.
The following user(s) said Thank You: BigShep, Fattykidd
Please Log in to join the conversation.
- Fattykidd
- Offline
- User
-
Less
More
- Posts: 150
- Thank you received: 3
1 year 8 months ago #3630
by Fattykidd
Replied by Fattykidd on topic Nested macros?
Thank you @bowlingbeeg
So to clarify because I'm dumb.
Define my macros in the macros section of the dashboard and then put the command to call those specific macros in the button command of the remote. Correct ?
With you saying the single and double delimiter is backwards that makes way more sense as to why I couldn't figure out what the heck was wrong with my macro, it would skip everything except the load scene command at the end. Looking at the logs it was saying no device with name and the generic ir driver was giving errors that it was missing information in the command.
I've spent so many hours staring at the documentation and my macros comparing. If I had hair I would've pulled it out.
So to clarify because I'm dumb.
Define my macros in the macros section of the dashboard and then put the command to call those specific macros in the button command of the remote. Correct ?
With you saying the single and double delimiter is backwards that makes way more sense as to why I couldn't figure out what the heck was wrong with my macro, it would skip everything except the load scene command at the end. Looking at the logs it was saying no device with name and the generic ir driver was giving errors that it was missing information in the command.
I've spent so many hours staring at the documentation and my macros comparing. If I had hair I would've pulled it out.
Please Log in to join the conversation.
Time to create page: 0.229 seconds