

You're probably not going to find a way to address Resolve UI elements without some form of "cursor movement" for things like this, at least not until BMD adds more comprehensive features to the API, which I wouldn't hold your breath for. I've been duplicating my AppleScript templates since then, so the superfluous m: syntax has come along for the ride ever since then. I honestly can't remember anymore why I used m: instead of c: I have a vague recollection from years ago that I may have used m: because I was always trying to open flyout menus, then selecting a submenu item by using relative pixel offsets from the coordinates of the main menu. Out of curiosity, why did you opt for using the "m" command with the "c" command after? Are there any advantages to doing it this way? With my script I just used the "c" command of cliclick to click at the coordinates and that seems to work. Cliclick's "-r" method and UIBrowser I imagine will be very helpful regardless though, so thanks a lot for mentioning those (really wish I would have known about UIBrowser before). I was able to get this macro working with Keyboard Maestro and AppleScript, so I'll plan on using this if I cannot find a way that works more seamlessly (and without cursor movement) using Resolve's API. Keyboard Maestro can do image recognition, but it’s very slow and not super reliable sometimes.Ĭlaytonbeutler wrote:Thanks a lot Mel.
CLICLICK APPLE SCRIPT UPDATE
Although if you do move the UI panels around, you’ll have to run the initialization macro again to update the coordinates. I have a KM Macro that initializes KM variables for my Resolve GUI mappings on startup, and it makes my shortcuts instantaneous. You can even significantly reduce the latency of the automation by “caching” the coordinates of the UI elements into global variables in KM, and address the elements using the global variables instead of the direct AppleScript GUI element indexes. This allows you to address UI elements even if they move around on the screen (e.g the overlay mode widgets in the Viewer Window.), and doesn’t rely on hardcoded cursor coordinates.

It’s a bit of a pain to dig out the indexes for the elements (I use UIBrowser by Pfiddlesoft for this) because for some reason Resolve responds VERY slowly when mapping out all the UI elements in UIBrowser, but once you determine the index for a specific element, you can address it directly using Keyboard Maestro (or any other app that can trigger AppleScript commands) You can use AppleScript GUI Scripting to address non-mappable elements like this in Resolve.
