Batch Convertion-Set in a "one-button-macro-action"

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, xnview

User avatar
Gerald_Ire
Posts: 43
Joined: Wed Nov 11, 2020 12:37 pm
Location: Germany

Batch Convertion-Set in a "one-button-macro-action"

Post by Gerald_Ire »

The Batch Conversion in XnViewMP has lots of good function. It would be lovely/perfect to combine afew standard fuction under "one button macro-action" - instead of marking images and starting batch converter and running thru single options again...
You do not have the required permissions to view the files attached to this post.
-------------------------------------------------------------------------------
:D Gerald says thx to all! :D
Franky
Posts: 87
Joined: Fri Mar 06, 2020 1:28 pm

Re: Batch Convertion-Set in a "one-button-macro-action"

Post by Franky »

Hi,
If I understood your request, it's automating the batch conversion, I talked about it here.
You can create a button associated with the script.
User avatar
Gerald_Ire
Posts: 43
Joined: Wed Nov 11, 2020 12:37 pm
Location: Germany

Re: Batch Convertion-Set in a "one-button-macro-action"

Post by Gerald_Ire »

Hi Franky, thx for reply. Yes that is the idea and you are not the only one... (regarding to your link in your post)
Q.: How do I get the *.XBS as a button into the ToolBar? Couldnt find the answer in your link/post. How did you made that pos.?
-------------------------------------------------------------------------------
:D Gerald says thx to all! :D
Franky
Posts: 87
Joined: Fri Mar 06, 2020 1:28 pm

Re: Batch Convertion-Set in a "one-button-macro-action"

Post by Franky »

Hi

In the Settings/Interface/Toolbar, add --COMMAND-- and assign it an XBS file that you have created in Batch Convert.
User avatar
Gerald_Ire
Posts: 43
Joined: Wed Nov 11, 2020 12:37 pm
Location: Germany

Re: Batch Convertion-Set in a "one-button-macro-action"

Post by Gerald_Ire »

Hi Franky,

did a setup but it doesn't work :(

What I've done so far and I add some screenshots - for everyone who follows this idea:
I can add in Settings/Interface/ToolBar/... more than one "--COMMAND--" into (both) ToolBar. In this case it is the ViewMode.
20210713_XnVIewMP000722.png
Found as well in this window on the lower right "Set comman..." and "Set label.." option.
With "Set command..." I add *.xbs and *.bat saved files out of the "Batch Convert".
20210713_XnVIewMP000724.png
This is how it looks like in my "foo.bar" (my own ToolBar file):
...

Code: Select all

<!...the important lines  ... >
_cmd_=XBS_TEST;D:/XBS_TEST.xbs;D:/XBS_TEST.xbs
_cmd_=BAT_TEST;D:/XN_BAT.bat;D:/XN_BAT.bat
_cmd_=;; <!... this is not assigned to commands ... >
The "Convert"-button in the "Batch Convert"-GUI does the whole job, but the two buttons in the "ToolBar" don't...
20210713_XnVIewMP000725.png
---------------------------------------------------------------------------------------------

Button XN_BAT.bat (the bat-file doesnt hold all options / missing is: iptc, transport file)
nconvert -dpi 260 -autocontrast -autolevels -o jpeg -q 90
...so does not work as intent!

---------------------------------------------------------------------------------------------

Button XBS_TEST.xbs (the xbs-file keeps all the options)

Code: Select all

<?xml version="1.0" encoding="UTF-8"?><XnView_script version="1.0" name="XBS_TEST">
    <Set_DPI x="260" y="260" keep="false"/>
    <Automatic_contrast/>
    <Automatic_levels/>
    <IPTC-IIM_XMP id_40="Test" id_105="XnViewMP FTP" id_120="test image xnviewmp ftp" id_122="Test" keepKeywords="true" replace="false" mode="1"/>
    <Output folder="D:/XnViewMP_target_folder" filename="{Filename}_{DstWidth}_{DstHeight}" case="2" startIndex="1" format="JPEG">
        <Options overwrite="0" orgDate="true" keepMeta="true" keepICC="true" keepFolder="false" keepParentFolder="false" keepExtension="true" delOrg="false" multipage="true" allPages="false" openExplorer="false" openBrowser="false" clearItems="false"/>
        <JPEG quality="90" progressive="false" optimizeHuffman="false" rebuildThumb="true" orgQuality="true" DCTMethod="2" subSampling="0" smoothFactor="0"/>
    </Output>
</XnView_script>
...could work as intent but I cat run it... :(

Where I am wrong with _cmd_=XBS_TEST;D:/XBS_TEST.xbs;D:/XBS_TEST.xbs
You do not have the required permissions to view the files attached to this post.
-------------------------------------------------------------------------------
:D Gerald says thx to all! :D
User avatar
xnview
Author of XnView
Posts: 36812
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Batch Convertion-Set in a "one-button-macro-action"

Post by xnview »

Gerald_Ire wrote: Fri Jul 09, 2021 12:27 pm did a setup but it doesn't work :(
Do you have always the problem?
Pierre.
Franky
Posts: 87
Joined: Fri Mar 06, 2020 1:28 pm

Re: Batch Convertion-Set in a "one-button-macro-action"

Post by Franky »

Hi,

The button opens the batch convert with the defined options but you have to start the conversion manually.
User avatar
Gerald_Ire
Posts: 43
Joined: Wed Nov 11, 2020 12:37 pm
Location: Germany

Re: Batch Convertion-Set in a "one-button-macro-action"

Post by Gerald_Ire »

Hi Franky, aaaah, ok...
Yes, if I add the --COMMAND-- in the ToolBar/Browser Mode... it actully opens the "Batch Convert" menu ... and yes, then I can press the "Batch Convert" button to run the script / convertion...

Thx for that and sorry for my missunderstandings...

-----------------------------------------------------------------------

My idea was to add "--COMMAND--" in the "ToolBar/View Mode:
click on image (images) and using the simplest function (dpi, auto color, auto contrast, standard iptc, send by ftp ... ) in a *.xbs

... and this I cant get it run...

Q.: Could it work? Any hint?
-------------------------------------------------------------------------------
:D Gerald says thx to all! :D
User avatar
xnview
Author of XnView
Posts: 36812
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Batch Convertion-Set in a "one-button-macro-action"

Post by xnview »

so the same as browser mode in viewer mode?
Pierre.
Franky
Posts: 87
Joined: Fri Mar 06, 2020 1:28 pm

Re: Batch Convertion-Set in a "one-button-macro-action"

Post by Franky »

I just put the same button on the View mode and it does not work, nothing happens.
On the other hand we can open the batch convert with Ctrl + U but without the defined parameters
User avatar
Gerald_Ire
Posts: 43
Joined: Wed Nov 11, 2020 12:37 pm
Location: Germany

Re: Batch Convertion-Set in a "one-button-macro-action"

Post by Gerald_Ire »

No, not realy the same:
The idea was in "viewer mode" to execute only a "standard *XBS" - with fixed : optimize, mark iptc, send ftp - that is hold in this "standard-xbs"
So there would be no need to reopen the "Batch Converter" - like it does in the "browser mode"

------------------------------------------------------------------------------------------------------------------------

The "browser mode" version of the --COMMAND-- is good as well - never checked this out (thx)!
This might gives you the chance to change some options... if all the other options stays as intented (have to check this "plan b")

Slán!
-------------------------------------------------------------------------------
:D Gerald says thx to all! :D
User avatar
Gerald_Ire
Posts: 43
Joined: Wed Nov 11, 2020 12:37 pm
Location: Germany

Re: Batch Convertion-Set in a "one-button-macro-action"

Post by Gerald_Ire »

as Franky said in his post befor: it doesnt work in the "viewer mode"...
-------------------------------------------------------------------------------
:D Gerald says thx to all! :D
User avatar
xnview
Author of XnView
Posts: 36812
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Batch Convertion-Set in a "one-button-macro-action"

Post by xnview »

Gerald_Ire wrote: Fri Jul 16, 2021 12:24 pm as Franky said in his post befor: it doesnt work in the "viewer mode"...
:bugconfirmed: Thanks to your detailed description I can reproduce the problem.
Pierre.
User avatar
xnview
Author of XnView
Posts: 36812
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Batch Convertion-Set in a "one-button-macro-action"

Post by xnview »

Gerald_Ire wrote: Fri Jul 16, 2021 12:23 pm No, not realy the same:
The idea was in "viewer mode" to execute only a "standard *XBS" - with fixed : optimize, mark iptc, send ftp - that is hold in this "standard-xbs"
So there would be no need to reopen the "Batch Converter" - like it does in the "browser mode"
so you would like to execute without opening the batch convert dialog?
Pierre.
Franky
Posts: 87
Joined: Fri Mar 06, 2020 1:28 pm

Re: Batch Convertion-Set in a "one-button-macro-action"

Post by Franky »

xnview wrote: Fri Jul 16, 2021 1:32 pm
Gerald_Ire wrote: Fri Jul 16, 2021 12:23 pm No, not realy the same:
The idea was in "viewer mode" to execute only a "standard *XBS" - with fixed : optimize, mark iptc, send ftp - that is hold in this "standard-xbs"
So there would be no need to reopen the "Batch Converter" - like it does in the "browser mode"
so you would like to execute without opening the batch convert dialog?
Yes :D
It would be nice if it was an option