I've configured a CLI so that when I select a screenshot.png file, it should open up that selected file in the Image Editor. I've tried:
"C:\Program Files\ShareX\ShareX.exe" "%1" -ImageEditor
"C:\Program Files\ShareX\ShareX.exe" -ImageEditor
But neither works. They launch the editor but then launch the File->Open dialog window to select the image to edit... but I've already selected that image.
What am I doing wrong with the CLI?
I don't believe there is anything in the code that passes the filename to the image editor.
It will always open the file dialog to let you select an image.
The exception is if an image is on the clipboard, it will prompt and ask if you want to edit that image.
This would have to be a new feature.
Right, it prompts me if it's still in my clipboard so it's not too much trouble to just hit
Same for File Upload. I have an extension to add it to all image files and when I right click on a .png and select my option for File Upload ("C:\Program Files\ShareX\ShareX.exe" -FileUpload), it prompts me for the file which I've just provided context to.
By "file which I've just provided context to" you mean you've passed it as a parameter right? Something like "C:\Program Files\ShareX\ShareX.exe" -FileUpload file.png"?
I've just implemented support for the CLI image thing, I'll pull request.
I specified this: C:\Program Files\ShareX\ShareX.exe" -FileUpload %1
@tx-trainwreck just use %1 without -FileUpload
Thanks, but that didn't work. There was no confirmation once I used "C:\Program Files\ShareX\ShareX.exe" %1. I also double checked imgur.com under my account and it wasn't there.
Maybe need "%1" ?
That worked!
"C:\Program Files\ShareX\ShareX.exe" "%1"
As of release 11.4 and the new -ImageEditor argument, the following works:
"C:\Program Files\ShareX\ShareX.exe" -ImageEditor "%1"
"C:\Program Files\ShareX\ShareX.exe" -ImageEditor "%1"
There is also an inbuilt option to "edit with shareX" on the context menu: https://github.com/ShareX/ShareX/issues/1281#issuecomment-507050095
If you use Faststone image viewer then these could be useful.

Most helpful comment
As of release 11.4 and the new -ImageEditor argument, the following works:
"C:\Program Files\ShareX\ShareX.exe" -ImageEditor "%1"