Problems / Questions regarding file preview

Hi, I'm at my wit's end, so I'm asking for help regarding the Dopus file preview:

  1. is it possible to fix the default width of the file preview in the lister?
  2. is it possible that if you enlarge the Dopus Explorer Lister window to the right on the right edge of the lister, that the width of the file preview increases in percentage MORE than currently?
  3. is there a possibility that you can mark & copy the OCR text in a PDF preview with PDF-XChange with the right button? - Or is that a PDF-XChange thing, so I should write to Trackersoftware?
    Thx. a lot!
  1. Viewer pane size is saved as part of the default lister (or layout, if you're using a layout). By default, the default lister is saved with the current settings when you close a window. You can also use Settings > Set as Default Lister to explicitly save the current window as the default lister (e.g. if automatic saving has been turned off).

    The size is stored as a percentage of the window's width, not an absolute size.

    You can also use the Set VIEWPANESIZE=x command to set the width to x% of the window's width.

  2. It'll always stay the same percent of the size it is currently (subject to minimum sizes of things) when resizing the window it is inside. You could have a button/hotkey/script which uses Set VIEWPANESIZE=x to quickly snap it to other percentages. A script could choose a percentage based on the current window width if you wanted to do something more complex than linear scaling.

  3. What PDF-XChange does is totally up to it. That's something to ask its developers about.

Leo, thanks for the responses.
I am still a bit inexperienced with creating scripts. So far I had only created one script (with your help, see Can you set the color of script columns?) in txt file.

I found out that there is now the possibility to create scripts under Options -> Toolbar -> Scripts. There you can now create scripts only as "VBScript" or "JScripts". No matter what I select and enter as description or somewhere in the script (as an example) "Set VIEWPANESIZE=600", either an error comes up or it doesn't work.
So, where exactly do I have to enter "Set VIEWPANESIZE=x" in the script.
Thanks for help and sorry for my not knowing.

You don't need scripting for simple commands. See here for how to use them:

FYI: When I am in the command editor, contrary to How to use buttons and scripts from this forum - #2 by Leo, under "Function" in the drop-down "Script Function" is not listed. Only when I click on "Advanced ..." further down, "Script Function" is shown as the function, with the following content:

  • for script type JScript:
function OnClick(clickData)
{
	// This is the default example OnClick script, to help get you started.
	// (You can use the "Default" menu above to replace this with your own default.)
	// 
	// Some essentials (see Scripting Reference in the manual for the rest):
	// - clickData.func.command:
	//     Command object.
	//     Preconfigured with source, destination and selected items.
	//     To change source/dest:
	//       cmd.SetSource, .SetSourceTab, .SetDest, .SetDestTab.
	//     To change files/folders acted upon:
	//       cmd.ClearFiles, .AddFile, .AddFilesFromFile, .RemoveFile, etc.
	//     To run a simple, single-line command:
	//       cmd.RunCommand("Help ABOUT");
	//     To run a multi-line command:
	//       cmd.Clear();
	//       cmd.AddLine("Help ABOUT");
	//       cmd.AddLine("Help LICENCEMANAGER");
	//       cmd.Run();
	// - clickData.func.Dlg
	//     Dialog object for showing message boxes and other UI.
	//     Preconfigured with the source tab as its parent window.
	// - clickData.func.sourcetab and .desttab:
	//     Source and destination folder tabs.
	//     Access to data such as:
	//       tab.selected, .selected_dirs, .selected_files.
	//       tab.all, .dirs, .files.
	//       tab.path (tab's folder path).
	//       tab.lister (top-level lister that contains the tab).
	//       tab.right (tells you if tab is on the left or right).
	//       etc.
	// --------------------------------------------------------
	DOpus.ClearOutput();
	// --------------------------------------------------------
	var cmd = clickData.func.command;
	cmd.deselect = false; // Prevent automatic deselection
	// --------------------------------------------------------
	cmd.RunCommand("Set VIEW=Details");
	// --------------------------------------------------------
	DOpus.Output("Selected items in " + clickData.func.sourcetab.path + ":");
	if (clickData.func.sourcetab.selected.count == 0)
	{
		DOpus.Output("  (none)");
	}
	else
	{
		for (var eSel = new Enumerator(clickData.func.sourcetab.selected); !eSel.atEnd(); eSel.moveNext())
		{
			if (eSel.item().is_dir)
			{
				DOpus.Output("  (d) " + eSel.item().RealPath);
			}
			else
			{
				DOpus.Output("  (f) " + eSel.item().RealPath);
			}
		}
	}
	// --------------------------------------------------------
	DOpus.Output("Folders below C:\\ root:");
	var folderEnum = DOpus.FSUtil.ReadDir("C:\\");
	while (!folderEnum.complete)
	{
		var folderItem = folderEnum.Next();
		if (folderItem.is_dir)
		{
			DOpus.Output("  " + folderItem.RealPath);
		}
	}
	// --------------------------------------------------------
	DOpus.Output("Folder tabs open across all windows:");
	for(var eListers = new Enumerator(DOpus.listers); !eListers.atEnd(); eListers.moveNext())
	{
		for (var eTabs = new Enumerator(eListers.item().tabs); !eTabs.atEnd(); eTabs.moveNext())
		{
			DOpus.Output("  " + eTabs.item().path);
		}
	}
	// --------------------------------------------------------
}
  • for script type VBScript:
> Option Explicit
> Function OnClick(ByRef clickData)
> 	' This is the default example OnClick script, to help get you started.
> 	' (You can use the "Default" menu above to replace this with your own default.)
> 	' 
> 	' Some essentials (see Scripting Reference in the manual for the rest):
> 	' - clickData.func.command:
> 	'     Command object.
> 	'     Preconfigured with source, destination and selected items.
> 	'     To change source/dest:
> 	'       cmd.SetSource, .SetSourceTab, .SetDest, .SetDestTab.
> 	'     To change files/folders acted upon:
> 	'       cmd.ClearFiles, .AddFile, .AddFilesFromFile, .RemoveFile, etc.
> 	'     To run a simple, single-line command:
> 	'       cmd.RunCommand "Help ABOUT"
> 	'     To run a multi-line command:
> 	'       cmd.Clear
> 	'       cmd.AddLine "Help ABOUT"
> 	'       cmd.AddLine "Help LICENCEMANAGER"
> 	'       cmd.Run
> 	' - clickData.func.Dlg
> 	'     Dialog object for showing message boxes and other UI.
> 	'     Preconfigured with the source tab as its parent window.
> 	' - clickData.func.sourcetab and .desttab:
> 	'     Source and destination folder tabs.
> 	'     Access to data such as:
> 	'       tab.selected, .selected_dirs, .selected_files.
> 	'       tab.all, .dirs, .files.
> 	'       tab.path (tab's folder path).
> 	'       tab.lister (top-level lister that contains the tab).
> 	'       tab.right (tells you if tab is on the left or right).
> 	'       etc.
> 	' ---------------------------------------------------------
> 	DOpus.ClearOutput
> 	Dim cmd, lister, tab, selItem, folderEnum, folderItem
> 	' ---------------------------------------------------------
> 	Set cmd = clickData.func.command
> 	cmd.deselect = false ' Prevent automatic deselection
> 	' ---------------------------------------------------------
> 	cmd.RunCommand "Set VIEW=Details"
> 	' ---------------------------------------------------------
> 	DOpus.Output "Selected items in " & clickData.func.sourcetab.path & ":"
> 	If clickData.func.sourcetab.selected.count = 0 Then
> 		DOpus.Output "  (none)"
> 	Else
> 		For Each selItem in clickData.func.sourcetab.selected
> 			If (selItem.is_dir) Then
> 				DOpus.Output "  (d) " & selItem.RealPath
> 			Else
> 				DOpus.Output "  (f) " & selItem.RealPath
> 			End If
> 		Next
> 	End If
> 	' ---------------------------------------------------------
> 	DOpus.Output "Folders below C:\ root:"
> 	Set folderEnum = DOpus.FSUtil.ReadDir("C:\")
> 	Do While (Not folderEnum.complete)
> 		Set folderItem = folderEnum.Next
> 		If (folderItem.is_dir) Then
> 			DOpus.Output "  " & folderItem.RealPath
> 		End If
> 	Loop
> 	' ---------------------------------------------------------
> 	DOpus.Output "Folder tabs open across all windows:"
> 	For Each lister In DOpus.listers
> 		For Each tab In lister.tabs
> 			DOpus.Output "  " & tab.path
> 		Next
> 	Next
> 	' ---------------------------------------------------------
> End Function

... but WHERE I have to input "Set VIEWPANESIZE=700" here ?
... If I enter here (or directly in the line "function") => "Set VIEWPANESIZE=700" ALONE without anything, an error is displayed when "executing", no matter if executed as JScript or VBScript.
So do you have a suggestion?

You don't need scripting for this. Don't set the button editor to script mode. Ignore the second post in the thread, which covers scripting.

You want the first post in the thread, and the section near the start of that called Raw Commands.

I had tried that (with just typing the command in the function line) earlier, where the errors came ... now it worked. Maybe it didn't work because I was thinking in "pixels" and therefore entered too BIG values (500, 600, 800 etc.).
Now I also found the solution for my question 2 for a FIXED STANDARD entry. - I did NOT add a new button, but simply edited the "File Preview" button
from:

Set VIEWPANE=Toggle

to:

Set VIEWPANE=Toggle
Set VIEWPANESIZE=40

... so it will open mit my predefinded size, too.
Thanks al lot, Leo!