[Lua] help with execute command on Windows

Started by kichetof, March 17, 2014, 08:29:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kichetof

Hi everybody,

I'm learning Lua coding, especially Lightroom Lua.

I've made a command which works on mac, but doesn't work on windows.


--pluginPath = path of the plugin like ~/plugin.lrplugin/
-- filePath = path of the image like ~/image.cr2
-- filePath = path of output command like ~/image.txt

local binExe = 'start ' .. pluginPath .. '\\bin\\convert.exe'
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)



Does anyone have the solution for fix that ?

When you or me will solve this problem, be sure you'll happy :)
Enjoy
Tof


kichetof