Custom arguments/parameters for command buttons

Bugs which have been reproduced by a second user or the developer

Moderator: Dreamer

Post Reply
User avatar
Programie
Posts: 2
Joined: Mon Jan 14, 2019 9:49 pm

Custom arguments/parameters for command buttons

Post by Programie » Mon Jan 14, 2019 9:53 pm

I want to execute a single script with different arguments using the command buttons.

Right now it's just possible to specify the script or application to execute and the currently selected or open file is passed as first argument. But it's not possible to pass additional custom arguments.

Would it be possible to implement passing custom arguments to scripts/applications? Maybe even using some placeholders for the currently open folder, file, etc.

User avatar
m.Th.
XnThusiast
Posts: 1524
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: Custom arguments/parameters for command buttons

Post by m.Th. » Tue Jan 22, 2019 5:35 pm

+1

Easy to implement.

For placeholders I suggest to use the standard DOS prefix, that is %
So we have:

%current_folder, %current_file etc.
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

User avatar
xnview
Author of XnView
Posts: 31002
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Custom arguments/parameters for command buttons

Post by xnview » Sat Feb 16, 2019 5:10 pm

you can add in your xnview.ini, OpenWithParam=
Pierre.

User avatar
Programie
Posts: 2
Joined: Mon Jan 14, 2019 9:49 pm

Re: Custom arguments/parameters for command buttons

Post by Programie » Sat Feb 16, 2019 6:23 pm

xnview wrote:
Sat Feb 16, 2019 5:10 pm
you can add in your xnview.ini, OpenWithParam=
I'm not sure whether we are talking about the same thing. The command is configured in the default.bar file instead of the xnview.ini.

The command currently looks like the this:

Code: Select all

_cmd_=Some title;/path/to/my/script;
How to pass a custom argument to the command to execute together with the currently opened file/folder?

User avatar
xnview
Author of XnView
Posts: 31002
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Custom arguments/parameters for command buttons

Post by xnview » Sun Feb 17, 2019 9:14 am

My apologies, yes will be good to be able to add parameters
Pierre.

Post Reply