Jump to content

Recommended Posts

Posted

I’m working on a program to help manage my intake workflow, which in part groups hdr stack frames. I’d like to open Affinity programmatically in HDR stack mode having already specified the frames of the stack. I couldn’t find documentation on the command line interface, so I’m hoping the documentation is what’s missing, not the interface. 

Posted

On a Mac you can use the common "open" command with the "-a" option for indicating an application.

For example:

Quote

> open -a "Affinity Photo" ~/Downloads/*.jpg

... which will start "Affinity Photo" and opens all JPG files from your "Downloads" directory.

There should be something similar for the Windows console in order to pass over parameters to the app via CLI. - Though not sure if APh has a CLI option for going directly into HDR stack mode here.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Posted (edited)

I’m spitballing here, but if this doesn’t exist it would be really helpful for automation. 
 

Something like 

> affinity open

> affinity open c:/path/to/photo/or/project/file.afphoto

Would open affinity, optionally with the specified file. 

the merge command would be able to specify mode (hdr, panoramic, focus stack, etc), take either a directory or an explicit list of files, and would either save the file as a *.afphoto or open affinity directly with the merged frames. 

> affinity merge focus -d=Path/to/folder/of/frames 

> affinity merge hdr —save-as=GeneratedStack.afphoto -f=file1.jpg -f=file2.jpg

if the merge command returned a file path, you could pipe that onto the open command to open the in progress merge file once the merge is done

 > affinity merge pano -f=Photos/Raws/date/panoramic1 —save-to=photos/WIP/date/panoramic1.afphoto | affinity open

would merge all frames in the Raws panoramic folder into a single panoramic, save the result as a affinity project in the WIP folder as panoramic1, and finally open the file in affinity for more editing when the merge is done.

commands like this would mean after I’ve uploaded the raw files to my PC, I could have my program merge all of my hdr stacks and panoramics into project files at night, while I am sleeping, and the next morning review the merged files to pick my favorites or continue processing.

 

Edited by johnscott999
Spelling
Posted

If you are on Windows I don't think there is an "open" command, instead you may try to call the apps executable path and pass one or several filenames to that. - So more something like ...

Quote

c:\path_to affinity\"Affinity Photo.exe" file.jpg file2.jpg ...

...or...

c:\path_to affinity\"Affinity Photo.exe" *.jpg

 

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Posted

However, the one or other Affinity Win developer can tell you for more sure, if and what CLI commads/options/parameters are available for the Win apps here!

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Posted (edited)
11 minutes ago, BofG said:

If there's no CLI to do what you need, you might be able to still do it using something like Auto HotKey. It would be a bit of a fudge, but technically you can programmatically do anything in AP and the host OS that you want to.

I prefer CLIs over that sort of automation since it takes over my computer while it’s running, and needs the pc to stay awake to run. Further, it is a lot harder to do error handling for shortcut automations. It’s definitely an option, but I’m hoping for something more robust

Edited by johnscott999
Making it more polite
Posted

Just to make life difficult, even if the Windows version supports a CLI, the MS Store sandbox probably prevents it working.

AP, AD & APub user, running Win10

Posted

Good, point, though I think uninstalled my version directly instead of through the store.  
 

it looks like the windows version I have can accept command line arguments, but treats any argument as a file path to openimage.thumb.jpg.635cd01dee667cea8b8d8db759c7006c.jpg

I got the same message for each of the commands shown

Posted

Or alternative ...

Quote

C:\Users\John> start "" "C:\Program Files\Affinity\Photo\Photo.exe" filename

Though AFAI remember Affinity apps do support at least some app argument to dismiss the info panel on startup etc. beside supporting common file arguments.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.