I am working on an automatization tool for Lightroom 5, using AppleScript (and a lot of UI scripting using System Events). I am using a Smile dialog as control script (although, it is planned to eventually create a control application using Swift).
I have a script which is supposed to import a set of Smart Collections. In order to do so, I am using UI scripting, plus a the "realClick" utility (written in Python) given as answer in this question .
If I run the script from AppleScript Editor, it works as intended. If I run the script from the Terminal (using the osascript syntax and the correct list of arguments), it works as intended.
But when I call it from the Smile control script
set myScript to "osascript path/to/script arg1 arg2"
do shell script myScript
the script starts to work, but when it comes to the UI scripting part, and the clicking, nothing happens.
I can't see any reasonable reason why this does not work. Probably I miss something simple.
I am running OSX 10.9.5, the newest version of Lightroom (via CC), and Smile version 3.8.0, build 845.
In the past, I have not been able to get in touch with anyone at Smile support at SatImage; maybe I was not trying the right channel, so, from there I have no help so far.
Any comment, hint, advice is highly appreciated. Thanks in advance.
Update: I gave up on Smile, and am now migrating what I have to XCode / ASOC. The first tests were successful, and things appear to be faster to me.