2 Replies Latest reply on Sep 27, 2017 12:08 PM by LightroomStatistics

    Check if external progam is installed -  LrTasks.startAsyncTask wait for answer

    LightroomStatistics Level 1

      In one of my plug-ins I need to check whether an external tool is installed.

      For this I added in the Plug-in manager a section called "Configuration" with a button.
      However I don't want to bother my clients with searching for the executable on the file system.


      So I want to execute with a command to check whether it is installed.

      LrTasks.execute( command )

      Since the code is added to PluginInfoProvider I can't use LrTasks.execute directly, because then I get the error:

      We can only wait from within a task.


      So I embedded it within a LrTasks.startAsyncTask ( function()



      How can I wait for the async task to finish and get the results?