Page 1 of 1

Toggling File Names Off and On in Thumbnails view

Posted: Tue Mar 20, 2007 10:24 am
by J Smith
By selecting menu, view, view as, thumbnails and thumbnails & labels, you can view thumbnails without and with file names. This is very useful.

For directories, I often need the directory names to identify them or to key to them with the keyboard to open a particular one.

For thumbnails, I find the filename often useful to go to a particular image and open it or to go to a place on the screen with the keyboard.

But turning the file names off gets me a full extra row of thumbnails. That's often very nice to have.

Thus, the usefulness of the file names can vary dynamically as I browse. It would be nice to have a single hot key to toggle the file names off and on.

I couldn't find a hot key to do this. I didn't even find a hot key for thumbnails only or thumbnails & labels. The only way to do this looks like going through all the menu commands, and that's a pain.

I tried to write a Macro Express macro www.macros.com to do this and got it to work. This macro illustrates the saying that if Rube Goldberg were still here, Macro Express would be his favorite program.

After using it, it has proven as valuable as I thought it would be.

I describe it in psuedo-code for lack of a better way to represent Macro Express code.

When you key view, view as, a dot appears indicating which of the two options, thumbnails or thumbnails & labels, is currently set. The macro works by getting the pixel color of the dot for the first one, thumbnails, and if a dot is there, then you do down arrow and enter to select thumbnails & labels, and if no dot is there, it does an enter to select thumbnails. The Macro Express command is get pixel color.

Thus you first have to use the Macro Express mouse locator to locate the window position of the dot in the view, view as, thumbnails command. On my system, the dot was at 602, 96, and the color for no dot there was 255. The color was red, and to Macro Express, red is apparently 255.

The position and color depends on your windows color scheme, and changing it will break the macro, unless you figure out all the possible values and program them in. This macro is as breakable as they come.

Updates to XnView might also break the macro.


The macro code goes;

Text type: <alt>v<enter> ' open up menu view, view as

Get pixel color window coordinates 602, 96 and save into variable N1 ' get the pixel color where the dot should be

If %N1% = 255 ' no dot on thumbnails

then

type <enter> 'select thumbnails


else ' dot on thumbnails

type <arrow> <enter> 'select thumbnails & labels

endif




Options, thumbnails, thumbnail tab, should include the filename.

I assigned the macro to control-shift-u. I use control-u for thumbnails and labels when going there from list and detail views.

While this macro works, it is hardly the ideal solution.
I think XnView should include a hotkey to do this.

Posted: Wed Mar 21, 2007 11:24 pm
by J Smith
The above macro didn't work with my dual pane display,

http://newsgroup.xnview.com/viewtopic.php?t=12218

because the numbers were wrong.


In my dual pane system, the window widths are 516 and the left positions are 0 and 509.

Using the Macro Express mouse locator I worked out the positions of the dot and revised the macro to as shown below to work both my single and dual pane configurations.


Macro Express Script for "Xnview, view, thumbnail, toggle file names in thum"
(C



Variable Set Integer %N1% from Width of Window

Text Type: <ALT>v<ENTER>

Switch (N1)

// Dual pane

Case: 516

Variable Set Integer %N2% from Left of Window

Switch (N2)

// left pane

Case: 0

Get Pixel: Screen Coords: 603,97 into %N3%

End Case

// Right pane

Case: 509

Get Pixel: Screen Coords: 334,95 into %N3%

End Case

End Switch

End Case

// Singal pane whole window

Case: 1024

Get Pixel: Window Coords: 602,96 into %N3%

End Case

End Switch

If Variable %N3% = 255

Text Type: <ENTER>

Else

Text Type: <ARROW><ENTER>

End If


I got this code by printing the macro script in Macro Express to a text file.

Moving the windows would likely break the macro.

These convolutions show again why XnView should a built in toggle hot key for file names off and on.