Need Help for Stand alone Image viewer

I want to set some behaviour of Stand alone Image viewer as like Below:
After Open any Image with Stand alone Image viewer

  1. 1st Dobule Click on that open imgae for Full Screen with zoom in the image 100%
    2nd Dobule Click on that 100% zoom in image for Full Screen with Fit to screen
    3rd Dobule Click on that Full Screen with Fit to Screen image for Exit Full Screen with Fit to Window

After Open any Image with Stand alone Image viewer
02. Zoom in 800% with Mouse Scroll UP
03. Zoom out with Mouse Scrool Down

I am afraid all the options you have are in Preferences / Viewer / Standalone Viewer / Mouse Buttons (Standalone Viewer). There is no viewer event that could be intercepted.

1 Like

Thanks for you kind Help.


I don't find any option to Here for 1st Dobule Click on that open imgae for Full Screen with zoom in the image 100%

Here I can only Set one thing that is Toggle Full Screen mode
But with the Toggle Full Screen mode I want one more thing that zoom in the image 100%
and I am afraid there is no item for select for done the job.
Please tell me how can I make the job done?

the next thing is I have been set this like this picture


now my mouse wheel can zoom in and zoom out but the zoom in and out are not smooth as Miscrosoft Photos zoom in or zoom out.
Is there any way to achive the same zoom in and zoom out behaviour in Stand alone Image viewer?

Yes, that's why I wrote "I am afraid" :wink:

Your best option at the moment are hotkeys.

But enhanced mouse support for the viewer is definitely a valid request.

1 Like

There are viewer events for click, dblclk and mclick which could be used to make double-clicking change zoom amount:

1 Like

Ah, yes... where were they hiding when I looked? :blush:

Answer: They were hidden/inactive because Preferences / Viewer / Standalone Viewer / Mouse Buttons / Left double-click wasn't set to Script event.

1 Like

I don't know how to handle mouse wheel events...

// viewer-dbclick
// (c) 2025 a815

// This is a script for Directory Opus.
// See https://www.gpsoft.com.au/endpoints/redirect.php?page=scripts for development information.



// Called by Directory Opus to initialize the script
function OnInit(initData)
{
	initData.name = "viewer-dbclick";
	initData.version = "1.0";
	initData.copyright = "(c) 2025 a815";
//	initData.url = "https://resource.dopus.com/c/buttons-scripts/16";
	initData.desc = "";
	initData.default_enable = true;
	initData.min_version = "13.0";

	var vars = initData.vars;
	vars.set("dblclk",0);
}


// Called when an event takes place in the standalone viewer
function OnViewerEvent(viewerEventData)
{
	var vars = Script.vars;
	if(viewerEventData.event === "dblclk") {
		var viewer = viewerEventData.viewer;
		var click = vars.get("dblclk")%3 + 1;
		if(click === 1) {
			viewer.Command("fullscreen,on");
			viewer.Command("zoom,100%");
		} else if(click === 2){
			viewer.Command("zoom,grow");
		} else if(click === 3) {
			viewer.Command("fullscreen,off");
			viewer.Command("zoom,fit");
		}
		vars.set("dblclk",click);
	}
	if(viewerEventData.event === "destroy") {
		vars.set("dblclk",0);
	}
}


So, I think that is posible with a script

am I right?

can you please teel me how to use this code?

Please read this: How to use buttons and scripts from this forum

In addition, you should select "Script event" from the drop-down menu.