New Feature / Info Request (Two Instances of XnView)

Ideas for improvements and requests for new features in XnView Classic

Moderators: helmut, XnTriq, xnview

Post Reply
Graphics
Posts: 13
Joined: Thu Dec 02, 2010 1:21 pm

Two Instances of XnView

Post by Graphics »

As indicated in the other post, I would like to open files / folders in two instances of XnView concurrently, by command line commands. As indicated, up to now XnView only allows for two options, only 1 instance yes or no. As indicated, every opening of a file / folder in XnView, by command line, opens another instance of XnView if you didn't opt for "one instance only: yes"; this makes 50 instances of XnView in some minutes if you open a lot of files / folders this way.

So, as indicated, I tried to have TWO instances of XnView installed at the same time, with different names, each with the option "one instance only: yes": XnView1.exe in the folder c:\programs\xnview1, and xnview2.exe in the folder c:\programs\xnview2; thus I wanted to do the command lines c:\programs\xnview1(2)\xnview1(xnview2).exe, respectively, in order to open files / folders.

I quickly noted that in xnview2, there wasn't any xnview.ini file; it seems that xnview2.exe in xnview2 folder relied upon the xnview.ini file in the folder xnview1.

I thus copied the xnview.ini file from folder xnview1 to folder xnview2, to no avail; renaming of the xnview.ini files to xnview1/2.ini respectively did not change anything; in any case, I either got all files / folders in only ONE xnview instance, or I got multiple (= not only two) instances of xnview when loading several files / folders (= more than two).

I also browsed the registry (Windows XP 3), for any indication which entry there I'd have to tweak = redirect in order to have the TWO DIFFERENT programs xnview1 and xnview2 concurrently; I didn't get any hint what to do (I'm not a programmer), so couldn't try out any changes there.

Thus, I'm stuck in my trying to have two instances (but not more than to) of XnView concurrently, and in my trying to address them separately from command line, as XnView1 and XnView2, or whatever.

Since the recurrent request for a two-folder-allowing XnView (= 1 instance allowing for visioning 2 files / previews / folders / thumbs sets, left and right or top and bottom, or whatever) has not been fulfilled between 2004, for 6 years now, I think it's not worthwile to wait another 6 years for this feature to be implemented since this waiting could be in vain eventually.

Thus my intended solutions, having 2 instances of XnView concurrently, and being able to address them by command line as "1" and "2" or in whatever distinctive way, seems to be a good intermediary solution.

But then, it should be possible to realize, and I would kindly ask some programmer / expert user / the developer(s) of XnView to comment on the possibility to tweak some ini files and / or the Windows registry in order to make it possible to have 2 instances of XnView that would be, by the Windows operating system, be regarded as two different programs, and thus could become independently assignable. I am sure that technically this must be possible even now, without any reprogramming effort, it would just be needed to have the information how to realize it, user-wise.

Could this information be shared, please? As indicated, I would be willing to pay for the program, and to buy several copies, and other professional users certainly would be interested in such a feature once it would be brought to their knowledge.

(I am aware the two "different" XnView "programs" = XnView installed two times under different names, would almost certainly not display, in their caption, different names, like "XnView1/2", respectively, but probably, they would both show the caption "XnView" - I could live with that; XnView1/2 would be on the left/right on the screen, so I would know which of the two different XnView programs I would need a given file / folder to.)

Thank you very much for any help.
Graphics
Posts: 13
Joined: Thu Dec 02, 2010 1:21 pm

New Feature / Info Request (Two Instances of XnView)

Post by Graphics »

Would it be possible to just answer my question if this would be considered or not? - 150 users regarding the thread in 2 days, so there must be some interest in such a feature that technically would perhaps even be possible without any programming, just more info about how XV ini files, etc. work. Thank you very much. (Or is there any programmer who could sell me the info, privately?)
User avatar
xnview
Author of XnView
Posts: 46253
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: New Feature / Info Request

Post by xnview »

You can use 2 different ini file by using "xnview -ini ini_filename", perhaps it will help you...
Pierre.
Graphics
Posts: 13
Joined: Thu Dec 02, 2010 1:21 pm

Re: New Feature / Info Request

Post by Graphics »

Pierre,

Have my big thanks for taking interest in this matter. Unfortunately, your concise help doesn't help me yet. I did this:

1 )

- I did just copying and renaming of xnview, thus c:\xn\xn1.exe and dito xn2.exe there. I followed your advice to specify the ini file, thus I did
- - c:\programs\xn\xn1.exe -ini ini_xn1.ini c:\pictures\1.jpg
- - c:\programs\xn\xn2.exe c:\pictures2.jpg -ini ini_xn2.ini

Thus, I did it in both possible ways; the both "worked" in the sense that I did not get any error message, but xnview displayed the pictures.

Unfortunately, this was always in the same instance, thus the two xn1/2.exe in reality seem to trigger just ONE xnview.exe program, whereever the installation process may install it.

2 )

I then deleted all this. Then I reinstalled the program 2 times, as xn1.exe into directory c:\programs\xn1, and as xn2.exe into directory c:\programs\xn2. I did as above, for the ini file. To no avail, I always got ONE XnView program, by which command line I trigger it. Trying to do some "tools-options", then exiting, then doing the same in the "other" xnview (1 or 2) does not change anything.

3 )

I see the category.db, XnView.db, etc., and I found 2 threads regarding hierarchical categories, distributed databases, external hd archives, etc. - so it seems to me that XnView is so much clinging to its ONLY program because of its metadata functionalities... whereas I, as said, would only need XnView as an imaging program, for just DISPLAYING given files, without "doing anything" to them.

Thus, I even tried out the light version, hoping that it would not allow for any metadata features, and thus it would allow for just displaying photos in different XnView light programs - no chance.

4 )

There is the usb stick version, but it's only for U3 usb sticks, and I don't have any of them, I just have normal usb sticks, so I couldn't try it out. Of course I am wondering if one c:\programs version of XnView and secondly, that U3 usb stick version of XnView would work together on the same comp, as two different programs...



I would not like to give up on XnView, but need more help than I've got up to now to make it work for me. Please be so kind, I would really appreciate this.
User avatar
xnview
Author of XnView
Posts: 46253
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: New Feature / Info Request

Post by xnview »

I have perhaps not understood your request, you would like to have 2 XnView running, but no more?

Else there is no need to install XnView, you can copy xnview.exe/xnview.ini in a folder
Pierre.
Graphics
Posts: 13
Joined: Thu Dec 02, 2010 1:21 pm

Re: New Feature / Info Request

Post by Graphics »

In XnView, there is the option "only one instance yes / no". I would like to have TWO instances of XnView, in order to view TWO different sets of thumbs / 2 previews at the same time. So I can set the option "only one instance" to NO = multiple instances, and then I can manually load XnView two times and arrange the two windows on the left and on the right of the screen, and manually, I then can select one of the two XnView instances, and make them show them any folder / file I want.

So far so good. When I want to load BY COMMAND LINE files / folders into those two instances, this does NOT work, since they cannot be distinguished by the system if you just load two instances of XnView.

Thus, every command line loading of a file / folder with the option to yes = just 1 instance only loads into a unique instance, and any command line loading with the option to no = multiple instances allowed, EVERY TIME loads a NEW instance, so when I load 50 files, I have 50 instances loaded with them.

But what I need, is loading, by command line, into instance 1 or in instance 2 (and I want to load the files into instance 1 or 2 to be specified by me, not in any aleatoric way), and not having any other instances than these two.

Loading into just 2 instances is for COMPARING two sets of photos, in any given two sub-directories, e.g. for two different products I would like to vision / show the details photos on ONE screen, in ONE computer, in order to toggle between the two sets of thumbs and / or to toggle between the two preview photos.

Thus, I just need XnView TWO TIMES on my computer, EACH with "only one instance allowed = YES", in order to avoid multiple instances. So I must have XnView TWO TIMES on my computer, and those ini files and / or entries in Windows registry mess totally up this trying out, whatever I do up to now. I just cannot have two times XnView (whatever the exe file / the directories my be called), it's just that every try to do a command line triggering of a second instance (= named differently than the first one) just replaces the content of the first and only instance, or even just trying to open the second instance manually will NOT open it, but give focus to the first opened (and single) instance -

or I have the option in the first instance to no, and then I quickly have to mess with 50 instances.
User avatar
xnview
Author of XnView
Posts: 46253
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: New Feature / Info Request

Post by xnview »

Ok, currently it's not possible. For 'only one instance' xnview search for a window with XmainClass windows class. So you can't switch command line to the second instance.
Pierre.
Graphics
Posts: 13
Joined: Thu Dec 02, 2010 1:21 pm

Re: New Feature / Info Request

Post by Graphics »

Thank you very much for answering.

I see two solutions:

- Not realizing the "allow for just instance only" by looking out for an identically named component element, but by ini / Windows registry entries. Then, when 1 "instance" ist renamed in fact to "another program", as in "xn1.exe" and "xn2.exe", each with its own installation and thus with its own ini file and registry entries, the second "instance" would not "know" there is another "instance" yet, but named otherwise.

- To implement any "key" for command line commands that addresses a specifically-named "instance" of XnView. Then, users could have the option "multiple instances", but "multiple" would then only be the number of instances users WANT to have, not 50 or 100 instances when opening 50 or 100 files / folders by command line. If those instances were "NUMBERED" (or otherwise identified) in any way, in the command line, users could use the codes -i1 and -i2, for example, to design instance 1 and instance 2; thus, a third loading and further loadings would be possible into 1 or 2, instead of loading 3rd, 4th, 5th... unwanted instances of XnView.

Could you please consider implementing one of those solutions? I know that professional users / users who apply command line commands are just a fraction, a minority... but then, they are a minority willing to pay (I hope), so it might not be without interest.

Thank you very much for taking into consideration.
User avatar
xnview
Author of XnView
Posts: 46253
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: New Feature / Info Request

Post by xnview »

Hum, perhaps the best solution is to be able to change the name of XnView instance, and be able to set the instance to use to send filelist... :?:
Pierre.
Graphics
Posts: 13
Joined: Thu Dec 02, 2010 1:21 pm

Re: New Feature / Info Request

Post by Graphics »

Absolutely, that's what I so desperately tried in various ways.

But please let me say that I'm very thankful once you got my problem, you show interest in it, instead of dismissing it.

You see, I was afraid I could not trigger any interest into it since the posts demanding one instance of XnView doing two folders / sets of thumbs / preview photos, for comparing two sets of photographies, or just to photographies in preview mode, are up to 6 years old and have never really be addressed; there were various suggestions how to best arrange those frames then, but nothing came from it. Of course, manually adressing two instances of XnView seems to resolve this problem, if not in a too elegant way, but it's any automation that is not yet possible then.

In fact, it's not so many image display programs that allow for automating addressing by another program; even programs that just display single shots, no thumbs, like MyViewPad (attention, it's not as ugly as it appears up-front, you can strip it to the bare minimum), mostly can NOT be taken to show images specified by other programs.

And in fact, there are a lot of information management programs, and even MS Word, etc., where loading too many jpg's puts you into trouble - for all those programs, may they be data base driven (Ultra Recall, etc.) or flat files (like in ActionOutline and many others), just having the jpg address encoded in the text, let's say in the form [PathAndName] or any other, and then, with a macro, loading the jpg in XnView, would certainly be a tremendous help in making the database / text file as tiny as possible: Let's say you have in your database several hundreds of MB, it's clearly an advantage to have another hundreds of jpg's or other graphics files easily at hand via XnView, in spite of doubling (or multiplying) your database size... into GB (response times??!!).

It goes without saying that XnView should advise on such possibities on its first page, in order to make people think about those chances XnView gives to them - I am well aware of the fact that if these possibilities are "hidden", most people won't get ever aware of them.

But anyway, interactivity between good applics is a tremendous thing if done well... whereas only corporations of a certain size upwards will go into the meanderings of employing their own programmers or having made their own special softwares by external consultants. So there is a gap between ready-made and custom-made, and any inter-software functionality in standard software fills up this gap a little bit - integration of standard programs is NOT only MS Office, etc., and can enhance your workflow in a tremendous way ;-)

Besides, you do great work on inter-platform integration!

It would be great to implement such a possibility to address, from other programs, two distinct instances of XnView (or 3, or 4... but then, the according screens do not yet exist!), and it would be worthwile to make such a feature known to users! :D
Post Reply