I am trying to observe Push buttons inside a JS script.
For instance if I try to observe the Shift button, I would go
Code: Select all
var api = new LiveAPI(sample_callback, "control_surfaces 1");
shift_button_id = api.call("get_control_by_name", "Shift_Button");
But when I try to assign this id number to a new object like that :
Code: Select all
var shift_button_api = new LiveAPI();
shift_button_api.id = shift_button_id;
jsliveapi: get path: error calculating the path
it seems that jsliveapi is trying to transform the id for the control into a path, but it can't.
I tried to use the technique in this thread (using a path such as
Code: Select all
control_surfaces 0 controls 92
but it doesn't work.
Anybody got an idea of how I could achieve this ?