Komodo Macro

Macros show up in the toolbox panel on the right-hand side of the Komodo window. They can be used to automate almost everything in Komodo, and all the Komodo add-on functionality is exposed to the macros.

Since users are used to writing JavaScript for their Mojo applications all macros are written in JavaScript (Python is also allowed, but not documented).

If you do not see the panel: View > Tabs & Sidebars > Toolbox.

Macro Basics
To create a new macro simply add your code to the starting script below

Deploy Functions
The deploy functions will automatically toggle and animate the add-on to prevent conflicts. The functions automatically use the active project to perform operations.

The above functions can optionally be passed an object with onSuccess and onFailure property functions.

For more customization you must use the base Palm functions listed below.

Macro Functions
All functions are asynchronous, with onSuccess and onFailure callbacks. These are written to make more complicated tasks very simple to write into a macro.

Check If Connected
The first thing you need to determine is if the emulator or device is connected.

Palm Commands
You may have never used the Palm command line since you are used to the add-on, but the following are what the quick buttons rely on:

Generate Application
This function is documented only to show the complete list of commands. It is recommended that you use the new project option in the emulator as this will only create the src/ contents.

Package Application
Package an application simply creates the ipk and places it into either the bin/release or bin/debug based on the framework_config.json settings.

Install Application
Install an application to the device or emulator. There are currently two options.

Once you pick a device or emulator to install to you must select an ipk. If you do not select an IPK it is automatically populated with the current project's ipk based off framework_config.json and appinfo.json.

Editing "appinfo.json"
Need to read in the appinfo.json or save property changes through commands. Like all commands these are asynchronous, meaning they won't cause Komodo to freeze while they are being run.

Getting the Object
To get the active project's "appinfo.json" into an object simply call the function below:

Saving the Object
The "appinfo" property contains either the full appinfo.json or partial properties. Make sure that overwrite = false or the entire appinfo.json will be overwritten.

Editing "framework_config.json"
Need to read in the "framework_config.json" or save property changes through commands. Like all commands these are asynchronous meaning they won't cause Komodo to freeze while they are being run.

Getting the Object
[Will type up shortly]

Saving the Object
[Will type up shortly]

Useful Macros
If you find a useful macro list it below.