Author Topic: Set options on editor launch  (Read 3650 times)

Offline Bob M

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • The McElroys of Point Alexander
Set options on editor launch
« on: May 27, 2019, 05:02:34 PM »
I use Raw Therapee as my raw editor.  It works best if you use its builtin file browser to navigate to a directory and then work on each file in turn.  It doesn't work so conveniently if you just want to edit a single file.  But often I  want to do just that a single file, chosen in Photo Mechanic and activated by crtl-e or command-e  The call "/path/rawtherapee.exe <photo to edit>" works but it has some issues.  From reading the documentation, much better would be the call "/path/rawtherapee.exe -R <photo to edit>". Is there any way I can specify that -R option (or any other option that might be appropriate)?  I suspect that the answer is no, but would it be difficult to implement?  I am interested in doing this on both a Mac 10.14.4 and on a Windows 7 machine.  But mainly on the windows machine.  (I have V5.0 build 19749 and V6.0 build 3143).

Thanks
Bob

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Set options on editor launch
« Reply #1 on: May 28, 2019, 12:12:07 AM »
Hi Bob,

One way of doing this on the Mac would be to use the Automator to create an app for you hat opens RawTherapee with the right option.

Open Automator, create new document, choose Application. Add a "Run Shell Script" step (found under Utilities in the Library), set the option for the input to pass this "as arguments" and replace the script text with something like /PATH/rawtherapee -R "$@". (see attached screenshot)

Note that you will likely need to play with the exact script code above as I don't have RawTherapee to test this.

For windows, there's hopefully something similar you can do.
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline Bob M

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • The McElroys of Point Alexander
Re: Set options on editor launch
« Reply #2 on: May 28, 2019, 06:09:00 AM »
Thanks Hayo, that was very helpful.  Unfortunately, I still haven't succeeded, but now I need to direct my questions to the Raw Therapee forum.

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Set options on editor launch
« Reply #3 on: May 28, 2019, 08:45:17 AM »
Let us know if you got it working!
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline Bob M

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • The McElroys of Point Alexander
Re: Set options on editor launch
« Reply #4 on: May 30, 2019, 04:14:09 PM »
Hayo

You asked for a response.  Here it is but it's somewhat anticlimactic.

When I wrote my original question, all of my experience was with windows and just a few cursory tests on the Mac.  It turned out that, due to my inexperience with Macs, I didn't recognize that it was behaving as I wanted even without the -R option selected.  So everything is fine on the Mac.

With windows it was a different story.  There were two aspects:  Was it even possible to get the behaviour I wanted and if so, how do I set the appropriate options.

With respect to the first aspect, I know it is possible, I just don't know how.  If you "right click" an image file in Windows File Manger and select "Open with RawTherapee", it behaves as I want, but I have been unable to duplicate this behaviour from the command line.

With respect to calling RawTherapee with various options, it was suggested that I could edit the registry.  Well no!  The other option would be to call RawTherapee with a Windows batch file that would call RawTherapee with the appropriate options selected.  I tried that but then I discover that PM won't let me call an external editor that isn't an "exe" file.  Since I didn't believe that I was going to get the appropriate behaviour even if I could call the batch file from PM, I decided to abandon my mission.  In the longer term, I expect to switch my editing from Windows to the Mac and I can certainly live with the current behaviour in the mean time.

Bob

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Set options on editor launch
« Reply #5 on: June 03, 2019, 01:05:08 PM »
OK, thanks for reporting back with the results. So on the Mac there really was no problem to begin with :)

On Windows, the problem is that you can't get PM to fire a batch file is something I don't know how to fix. On the Mac you can use the automator (as I proposed) to create an app file that can be used as executable   in PM. For Windows alas, I don't know such a solution :(

But since you're moving to the Mac this won't be a problem for you for long, so that's good news en the end :)
Hayo Baan - Photography
Web: www.hayobaan.nl