Timeout issues when executing large amounts of AppleScript

Is something not working like it should? Let us know.
User avatar

2023-04-16 02:47:27

I am a professional programmer and amateur photographer who uses Pixelmator Pro for all my general photo editing tasks.

I recently started using a product called Streamdeck Plus from Elgato, but currently, there is no existing plugin for Pixelmator Pro. So, I am creating a plugin that can be used with Streamdeck Plus, allowing me to perform tasks like adjusting brightness using the digital knob on the Streamdeck Plus. (https://www.elgato.com/en/stream-deck-plus)

This plugin internally uses the NSAppleScript class to execute AppleScript. (https://developer.apple.com/documentati ... pplescript)
For example, when adjusting brightness, it internally stores the current brightness value and adjusts the brightness value in Pixelmator Pro through AppleScript based on the changes in the knob.

When I did a simple proof of concept, it worked well, but problems arise when I continuously turn the digital knob for testing purposes. There are intermittent timeouts while executing AppleScript, and when a timeout occurs, the value no longer changes even if I continue to turn the digital knob. Note that my plugin does not run AppleScript concurrently in parallel.

Is there any throttling in place in Pixelmator Pro when executing AppleScript, particularly when too many AppleScript executions are received?

My plugin repository is below:
https://github.com/scryner/streamdeck-pixelmator

AppleScript runs with below code:
https://github.com/scryner/streamdeck-p ... t_runner.m




Your response would be greatly appreciated.