16 Replies Latest reply on Mar 26, 2014 8:31 AM by kichetof_

    LrTasks.execute problem on windows

    kichetof_

      Hi everybody,

       

      I wrote a script to convert image after export. It works very well on Mac, but I can't run the same function on Windows.

       

      This is the part of the wrong code:

       

       

      -- pluginPath = path of the plugin like ~/plugin.lrplugin/
      -- filePath = path of the image like ~/image.cr2
      -- output = path of output command like ~/image.txt
      
      
      local binExe = 'start ' .. pluginPath .. '\\bin\\convert.exe' -- not working
      if MAC_ENV then
       -- exec path for Mac (& force language to english; seem to be unnecessary LANG=C LC_ALL=C LANGUAGE=en)
       binExe = 'exec "' .. pluginPath .. '/bin/convert" '
      end
      command = binExe .. '"' .. filePath .. '" > "' .. output .. '"'
      
      
      result = LrTasks.execute(command)
      
      

       

       

      I tried a lot of combination with simple or double quote but nothing!

       

      I hope you can help me to solve it!

       

      Many thanks

      Tof