I put together a dual pane system that is working well.
Underlying Problem
I put this scheme together to address a specific problem. I often get new photos and want to store them in my collection. I have organized it in some 200 hierarchic Windows directories, which I can browse. I also use MyAlbum www.myalbumpro.com as a favorites index. If I want to review a favorite and related images, I locate it in the myalbum thumbnails, key control-enter to open the image in xnview, and then key control-b to view and browse the entire directory of the photo.
Determining where to store a photo requires visually examining directories to find a match. The directory names frequently do not suffice to identify my desired target directory.
In the past I used Irfanview because I like it. However, because you can't drag and drop, or cut and paste, from the thumbnail display, the program doesn't address well adding images to my collection. If you start from the source directory, you can start another copy of Irfanview to search visually for a target directory, but, when you find it, you must return to the first copy of Irfanview and use the file move command dialog box to navigate again to the target directory -- a tiring process. The arrangement provides no easy way to confirm the move.
I tried Faststone, but could only get one copy to work at a time. With it, I needed another explorer program to keep two cut and paste photo explorer windows open concurrently.
I tried xplorer2 lite. That program provides a dual pane file display that includes thumbnails. You could compact them to maximize the number on the screen. The dual pane display provided exactly what I needed to compare an image with those in possible target directories. You could easily cut and paste between the panes and verify move operations.
However, xplorer2 proved unworkable because it did not write thumbnails on the screen when you opened a directory but as you scrolled through it. You would open a directory and watch the program draw a screenful of thumbnails. Then you would page down and watch the program draw another screenful of thumbnails. Then you would page down again and watch and wait again. This grew old quickly.
So far, the following system of dual copies of XnView have solved my problem with no annoyances. It gives me two photo explorer screens with compact thumbnails side by side between which I can easily cut and paste and visually confirm file moves.
The Process
Close xnview if open.
Copy your existing xnview.ini file, wherever it is, to xnview.ini.xxx there for backup.
Start xnview. Set options, general, operations tab, "only one instance" to off, i.e. unchecked to allow multiple instances.
Set options, interface, interface tab, "remember last window position, size" to on, i.e. checked.
Resize approximately the xnview window to the left half of your screen, as it you want to be for the left of your dual panels. You can precisely position and size the window later.
I also would close the tree and preview screens. For my problem, the tree and preview screens take up space I had rather use to display more thumbnails.
Close xnview. The program should store a new xnview.ini file with the new windows positions and options.
Open the xnview.ini file the program just saved in a text editor.
Create a new directory <drive>:\application data\xnview. This choice and other code reflects my single user Win 98 SE system. XP users need to determine the equivalent on their system depending on how they have set up users and user directories.
Save the open xnview.ini file in that directory as file xnviewal.ini. The "al" stands for alternative, left.
Restart xnview and reposition approximately the window for the right pane. Close the program.
Open the just saved xnview.ini file and save it in application data\xnview as xnviewar.ini. The "ar" stands for alternative right.
Rename your original saved xnview.ini file xnview.ini.xxx back to xnview.ini.
Return to your text editor and create a new DOS batch file as follows.
(Below I use f for the drive because my main partition is on my drive f.)
rem locate the program directory drive
f:
rem go to the xnview directory
cd "\program files\xnview\"
rem open the right pane
xnview.exe f:\ -ini "f:\application data\xnview\xnviewar.ini"
rem open the left pane
xnview.exe f:\ -ini "f:\application data\xnview\xnviewal.ini"
These commands start xnview twice in multi instance mode with the two different ini files for two different positions on the screen.
I started the one right panel .ini file first in the batch file because I generally want to start work in the left one. Starting the left one last in the batch file makes it the active window at the end of the batch file.
I opened the panels in f:\ because that was a good starting point for me. You should enter a good starting point for yourself for the f:\ parameter following the ".exe."
I used a DOS batch file because it is the simplest way to start two different programs one after another, and I think works on all versions of Windows. See below for some alternatives to a batch file.
Locate the windows start menu directory for xnview. Save this batch file there as xnviewdp.bat. The "dp" stands for dual pane.
Click the start button, locate the xnview entry, and start the batch file. Two side by side xnview panes should appear.
Now precisely position and size the two xnview windows as you choose. You should ask if you want equal sized right and left panels or one larger than the other. Also, you need to consider what size and how many thumbnails you want. The ones on the xnview list may not be optimal to maximize the thumbnail space. I have found that differences as small as one pixel can open the horizontal scroll at the bottom and cause loss of pixels for vertical display.
It took me a while get these adjustments as I wanted.
Some people might prefer top and bottom panes to right and left ones.
I used 123 x 120 for thumbnail sizes for seven columns and four rows in a single xnview window on a 1024 x 780 screen. For dual screens, I use 102 x 100 for dual pane display of four columns and four rows of thumbnails, with only the menu bar on.
I also discovered that it helped to position the right border of the left pane on top of the left border of the right pane, as opposed to next to it. Doing so gained a few more pixels for thumbnails.
Close both xnview windows to update the two xnview.ini files.
Next start the programs again and in each window set options, interface, interface tab, "remember last window position, size" to off, unchecked. This way, you can reposition the windows after opening them without changing their start up position. Once you get these settings right, you don't want to lose them.
Exit xnview in each panel to save the new settings.
On my system, I found one additional step necessary. When I started the batch file, a DOS window appeared and did not go away. To fix this, go to the xnview start menu directory and create a shortcut to the dual pane batch file in that directory, In the shortcut program tab set the run drop down box to minimized and check close on exit.
If you create a short cut in the directory and want the batch file not to appear on the start menu, you can make it hidden.
This process would work with 3, 4, or more panels if you have a large screen.
You could also use multiple .ini files for different thumbnail sizes. You could also use them for different size thumbnails.
When you start the batch file, you will get two side by side frames. You can toggle between with alt-tab. That comes close to xplorer2, where you can swap panels with a tab.
When you use some other programs, the side by side frames go away when overlain by other windows, and alt-tab switches between the last active window, not between the two Xnview screens. To restore the side by side panes and the function of the alt-tab key to toggle between them, click the task bar box for one panel and then the other one.
From the beginning, I wondered if this would work. So far it has.
Alternatives to the Batch File
The above system turned out to have one major annoyance. I wanted the initial active pane to be the one on the left. I think of copying from the left to the right. In a batch file, the left window had to be the second program to execute. However, as a result, on the Windows task bar, which I use, the first starting program, the one on the right, became the box on the left on the taskbar, and the left pane became the right box on the task bar. This annoyance grew with time.
I came up with two alternative solutions.
Macro Express
I wrote a macro express macro, www.macros.com , to launch and activate the left pane, wait 1.5 seconds, launch and activate the right pane, and then do an alt-tab to activate the left pane.
This has worked reliably. However, you have to buy macro express. They price it reasonably for consumers, and I don't see how any Windows user lives without it.
Freeware alternatives may exist. Having bought it and being happy with Macro Express, I haven't looked for alternatives.
Windows Script Host
I developed the following windows scrip host .vbs file.
This script proved difficult to get to work and still has one medium problem.
I would not call WSH a consumer product.
I have included my script with my disk drives for fear that if I changed anything it might not work for someone else.
' Xnview dual pane start up
set WshShell = createobject("WScript.Shell")
path = "f:\progra~1\xnview\xnview.exe f:/ -ini f:\applic~1\xnview\xnviewal.ini"
Wshshell.run path, 1, false
Wscript.Sleep 1000
path = "f:\progra~1\xnview\xnview.exe f:/ -ini f:\applic~1\xnview\xnviewar.ini"
Wshshell.run path, 4, false
Wscript.Sleep 6000
' send an alt tab to the left pane to make it active
WshShell.SendKeys "%({TAB})"
Wscript.Sleep 13000
Store this as a .vbs file in the xnview start up directory.
I used the tilde (~) in the paths because I couldn't get it to work without them, although it should be possible.
I never understood exactly how the second parameter to the run method works.
I have tested this only with Win 98 SE because I don't have an XP system. My Windows Script Host was 5.6, which is current. I would hope that it would run under XP.
I have a relatively slow system, and I think the timing values could be higher than necessary in a faster systems.
For reasons unknown to me, when xnview starts up for the first time following a windows reboot, it seems to take longer to start than at other times, and, as a result, the alt-tab, WshShell.SendKeys "%({TAB})", goes to the bit bucket and the right pane starts up activated, not the left one. You could increase the sleep times to avoid this first time up, but that would delay subsequent starts ups, which seem to work with the values above.
I don't know why the last Wscript.sleep for 13 seconds is necessary but I discovered that without it WSH would crash.
A Dual Panel XnView System
Moderators: XnTriq, helmut, xnview
-
- XnThusiast
- Posts: 4608
- Joined: Sun Jul 25, 2004 9:08 pm
Similar topics:
http://newsgroup.xnview.com/viewtopic.php?t=5342
http://newsgroup.xnview.com/viewtopic.php?t=896
http://newsgroup.xnview.com/viewtopic.php?t=5342
http://newsgroup.xnview.com/viewtopic.php?t=896
Dreamer