I seek to run the windows version of dcraw on a selected picture via plugin and then have the plugin automatically import the resulting TIF image back into LR so it is displayed beside the original raw file.
I am no developer at all but understand that plugins can be created with some scripting code.
I tried something like this here but failed:
local LrTasks = import 'LrTasks'
local LrApplication = import 'LrApplication'
local catalog = LrApplication.activeCatalog()
local cat_photos = catalog.targetPhotos
for i, photo in ipairs(cat_photos) do
local file = photo.path
LrTasks.execute(C:programs/dcrawps64.exe "-T" "-4" "-G" "20" "-v" " ..file.. ")
There are a couple of issues:
a) is the approach ok generally?
b) I have serious problems with the path to the application. Quotes or not? forward or backslashes used?
c) I seem to have same issues with getting the blanks and single and double quotes correct.
Any hints anyone?
on Windows systems, LrTasks.excecute() is tricky:
- substitute \ by \\\ (this is a Lua issue)
- surround each pathname that has a space in it with double-quotes (")
- substitute > by ^>
- in addition, surround the whole commandline with double-quotes
Besides that your program path doesn't look correct. It should be:
and therefore in your Lua code, you have to use:
It's a long way...
Not sure how??? but I have been included in this post, but to my knowledge, have never been on there except when trying to find the main LR forum page.I may have inadvertently added myself by the mere act of clicking on the Lightroom SDK link.I have never asked a question nor replied to anyone on this forum - not to my knowledge at least; so getting me off this list of users that regularly get emails from this forum would be very good. The question is - how?