Page 1 of 1

Which is XnviewMP syntax to use "path" of selected file in a "parameter" (configure programs):

Posted: Tue Jul 03, 2018 12:23 pm
by cadu
Hi,

I would appreciate help.

In order a parameter (configure programs) can work, I need to insert the "file path" of the selected file in XnView browser.

The main parameter is "-ImageEditor", but I need to add a "file path" prefix to it, as showed in this snapshot:
xnviewmp_2018-07-03_14-21-35.png
xnviewmp_2018-07-03_14-21-35.png (19.84 KiB) Viewed 2576 times

As fictional example (since %FILEPATHS% doesn't work in XnView), what I need is something like: "%FILEPATHS% -ImageEditor"

Which is XnviewMP syntax to use "path" of selected file in a "parameter"?

Thanks for assistance,
Carlos

Re: Which is XnviewMP syntax to use "path" of selected file in a "parameter" (configure programs):

Posted: Tue Jul 03, 2018 2:21 pm
by xnview
currently the full pathname of file is used as argument, so no way to add path of this file

Re: Which is XnviewMP syntax to use "path" of selected file in a "parameter" (configure programs):

Posted: Fri Feb 12, 2021 10:15 pm
by stevehero
I got this working with:

Code: Select all

-ImageEditor %1
Image

ED: Only noticed this only works with one file selected.

Re: Which is XnviewMP syntax to use "path" of selected file in a "parameter" (configure programs):

Posted: Fri Mar 05, 2021 4:24 am
by Patrice.
stevehero wrote: Fri Feb 12, 2021 10:15 pm I got this working with:

Code: Select all

-ImageEditor %1
ED: Only noticed this only works with one file selected.
Try

Code: Select all

-ImageEditor %U
it should work with multiple selected images, it works like a charm for me (Ok, I'm on Linux but you can try it with a test directory)
screenshot_20210305-122801.png
screenshot_20210305-122801.png (27.6 KiB) Viewed 1944 times

Re: Which is XnviewMP syntax to use "path" of selected file in a "parameter" (configure programs):

Posted: Fri Mar 05, 2021 4:19 pm
by stevehero
Unfortunately, that didn't work for this case. It was trying to upload them too.
I had help on another similar thread and I'm now using a .bat file.

Code: Select all

:bb
if %1==z goto end
"W:\Apps (Portable)\Screen Capture Apps\ShareX\ShareX.exe" -ImageEditor %1
shift
goto bb
:end
exit

Re: Which is XnviewMP syntax to use "path" of selected file in a "parameter" (configure programs):

Posted: Sat Mar 06, 2021 2:47 am
by Patrice.
last suggestion, did you try: -ImageEditor "%1" (with double quotes " ", In a different forum I saw many Windows users are using " " in parameter, I'm not a Windows user though, so I don't know) or call directly the app by its file name the same way: ShareX.exe "%1" (with or without the - )

In all case I'm glad you've found a solution :D

Re: Which is XnviewMP syntax to use "path" of selected file in a "parameter" (configure programs):

Posted: Sat Mar 06, 2021 2:54 am
by stevehero
I did try that. Double quoting didn't have any affect.

Re: Which is XnviewMP syntax to use "path" of selected file in a "parameter" (configure programs):

Posted: Sat Mar 06, 2021 3:16 am
by Patrice.
Did you tried to see what's the exact command in your Microsoft Windows main menu (the main app launcher in the Windows OS something like Start button then Programs/...) with a right click on the name of the application (here ShareX) then "properties" or with a menu editor?

A bit like this (sorry it's the Linux "Main menu editor", but you should have something similar on your system)
screenshot_20210306-111057.png

Re: Which is XnviewMP syntax to use "path" of selected file in a "parameter" (configure programs):

Posted: Sat Mar 06, 2021 3:15 pm
by stevehero
I'm not sure where %U comes into play in windows.

Here's the command line argument that's used for Windows.

Code: Select all

"C:\Program Files\ShareX\ShareX.exe" -ImageEditor "%1"
Source: https://github.com/ShareX/ShareX/issues ... -258318864

Re: Which is XnviewMP syntax to use "path" of selected file in a "parameter" (configure programs):

Posted: Sun Mar 07, 2021 4:27 pm
by Patrice.
So no choice, for Windows it's "%1"
I saw on the gihub link you provided some one did put "-ImageEditor (filename)" instead of "-ImageEditor %1" did you tried it to open multiple images?

Re: Which is XnviewMP syntax to use "path" of selected file in a "parameter" (configure programs):

Posted: Sun Mar 07, 2021 5:07 pm
by stevehero
That was me that posted that. That was for faststone image viewer. Doesn't work for this app.