View Full Version : Navigating in the CCF tree with NetRemote LUA Library
Barf
April 27th, 2007, 11:00 AM
I would like to navigating through the CCF "tree" to (globally) access a certain button, like (pseudocode)
button = GetPageGroupByName("mydevice"):GetPageByName("cool_page"):GetButtonByName("cool_button");
button:ButtonDown();
From the documentation, it appears to me as the current NR cannot do this. Is there any way? Or is it planned to augment the "API"?
Ben S
April 28th, 2007, 05:45 AM
Correct, this is not currently supported.
This is not intended to be in NetRemote 2, because of the way the file is loaded and used.
What about taking the action of that button and putting it in lua, and having your existing button call that lua, also?
Rob H
April 28th, 2007, 01:23 PM
Alternatively, if there aren't too many buttons of this kind you could put them on the device template (possibly on a hidden frame). Then the will always be available on the current page.
Barf
April 29th, 2007, 03:42 AM
@Ben S:
Thanks for your answer.
What about taking the action of that button and putting it in lua, and having your existing button call that lua, also?
It is slightly awkward to define a subset of the IR-codes in IR-Actions in buttons, and the complementary subset in LUA code. (For me) more importantly, the GlobalCache bug prevents me from using a NR version that supports sending IR from LUA... :-(
@Rob H:
Nice workaround, unfortunately the pages are using different templates...
Rob H
April 29th, 2007, 05:08 AM
You could have the same buttons on different templates of course, although that could be a bit of a pain if you modify just one of the templates. If they're all on a hidden frame though you could just copy and paste the frame after a modification.
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.