Just getting started with this, really.
From a js script, is it possible to initiate a "File/Save" action, or menu action generally, or emulate a keyboard shortcut to a menu action?
Trigger a "File/Save" action?
-
- KVRer
- Topic Starter
- 27 posts since 4 Oct, 2007
I'm looking at java, now.
I see there is the possibility of issuing hotkeys for Bitwig menu commands by computer keyboard emulation via a gui automation class such as AWT Robot. There must be plenty of similar classes out there. Would want to be lightweight.
Or maybe there is a better approach.
Does the Bitwig API provide built in support for this?
I see there is the possibility of issuing hotkeys for Bitwig menu commands by computer keyboard emulation via a gui automation class such as AWT Robot. There must be plenty of similar classes out there. Would want to be lightweight.
Or maybe there is a better approach.
Does the Bitwig API provide built in support for this?
-
- KVRer
- Topic Starter
- 27 posts since 4 Oct, 2007
Couldn't instance AWT Robot due to "headless environment".
However I discovered the much better way (eventually, the doc is terse!):
However I discovered the much better way (eventually, the doc is terse!):
Code: Select all
final ControllerHost host = getHost();
final Application app = host.createApplication();
final Action [] list;
list = app.getActions();
for(int i=0;i<list.length;i++) {
if(myStringMatch("Save as...",list[i].getName())) {
host.println(list[i].getName());
list[i].invoke();
}
}