Page 1 of 2

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

Posted: Thu Jul 08, 2021 1:17 pm
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...

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

Posted: Thu Jul 08, 2021 1:26 pm
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.

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

Posted: Fri Jul 09, 2021 5:51 am
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.?

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

Posted: Fri Jul 09, 2021 11:10 am
by Franky
Hi

In the Settings/Interface/Toolbar, add --COMMAND-- and assign it an XBS file that you have created in Batch Convert.

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

Posted: Fri Jul 09, 2021 12:27 pm
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

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

Posted: Fri Jul 16, 2021 11:15 am
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?

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

Posted: Fri Jul 16, 2021 11:39 am
by Franky
Hi,

The button opens the batch convert with the defined options but you have to start the conversion manually.

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

Posted: Fri Jul 16, 2021 11:53 am
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?

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

Posted: Fri Jul 16, 2021 12:12 pm
by xnview
so the same as browser mode in viewer mode?

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

Posted: Fri Jul 16, 2021 12:22 pm
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

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

Posted: Fri Jul 16, 2021 12:23 pm
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!

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

Posted: Fri Jul 16, 2021 12:24 pm
by Gerald_Ire
as Franky said in his post befor: it doesnt work in the "viewer mode"...

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

Posted: Fri Jul 16, 2021 1:31 pm
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.

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

Posted: Fri Jul 16, 2021 1:32 pm
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?

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

Posted: Fri Jul 16, 2021 2:03 pm
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