GP SoftwareTwitter
Opus FAQsManualCommandsObjects

AHK Script to add Middle Click MDI functionality to DOpus Light

Overview

For now, I am releasing the AHK Script I wrote which re-adds Middle Click functionality which is present in ALL tabbed / MDI programs..

AutoHotkey Post: autohotkey.com/boards/viewtopic.php?f=6&t=24996

I am working on a new version of my AHK framework to support dynamic loading of scripts ( which can't be done using AHK without using loopholes, ie creating a file with the load-order then running it - so you can drag and drop such additions into it and it'll run with no scripting knowledge ) and will release that soon under bitbucket:

https://bitbucket.org/Acecool/acecoolahk_framework/overview?init=true


Script Operation / Logic:

  • If app is or isn't active and you middle-click a folder - that folder will open.
  • If app isn't active and you Ctrl + middle-click a folder - that folder will open. (Because Left-Click event is fired if app isn't active which will also de-select any previously highlighted files or folders.)
  • If app is active and you Ctrl + middle-click anywhere in the file-display - the highlighted folders will.
  • If app is or isn't active and you middle-click a tab - that tab will close.
  • If app is or isn't active and you Ctrl + middle-click a tab - that tab will close.
  • If app is or isn't active and you Alt + middle-click in the file-lister - the last tab which was closed will re-open ( unfortunately, this will only re-open the last tab and it doesn't store history to re-open anymore beyond the first ).

Failsafe (Again, this shouldn't happen at all anymore):

Because there was a bug (which should be fully-resolved by adding *~MButton UP:: return) when using middle-click which caused some of the buttons to stick preventing ANY mouse-clicks on any application other than the last one used - the way to correct this is by opening the Security Options Screen (Windows 10) by using Ctrl+Alt+Delete.. If you Left-Click anywhere in that screen once (all of the buttons will be disabled until you click once) then it will undo the problem and you can click cancel or task-manager then close the AHK Script and report the issue so I can look into it... Please include your operating system and other info. This information can help me find the issue; Other information which can be useful would be running applications, what you were doing, and steps to reproduce the issue if you can reproduce it reliably...

Notes:

  • Holding Ctrl and middle-clicking will not open anything if no folders are highlighted.
    Holding Alt and middle-clicking will not re-open any tabs if you click outside of the file-lister or if you haven't closed any tabs before or after using this command.

  • Because of how AHK works, and how the script works.. Using a messagebox for debugging wasn't working well so I set up a simple tray icon system... In the following order: If the app (dopus.exe) file-list is under the mouse then an application icon with a blue-box at the bottom right and the dopus icon overlay will be displayed as the icon... If the app is under the mouse (anywhere other than file-list) then the same icon will appear except the blue box covers almost the entire inners of the application icon. If the app is active, but the mouse isn't in its bounds then a dopus icon will appear with a green checkmark overlay will appear at the top right... If the app is running then the icon will be a plain application with dopus icon overlay at the top left... If the app isn't running then it will be the dopus icon with a red exclamation overlay.

    These icons will help in case debugging is necessary... Also, if the app isn't running should I make it so if you click the tray icon to launch it or set it up so if you launch the script dopus launches with it?


Bugs:

  • If left-clicked to highlight and middle-click also left-clicks (not pressing Alt or Ctrl or when app isn't active) within the double-click timeframe then the folder will open.

  • If left-clicked to highlight and middle-click also left-clicks (not pressing Alt or Ctrl or when app isn't active) within the rename-click timeframe then the folder will be in rename-mode.

Bugs which may have been resolved (Need testers to confirm):

  • As there is a delay between opening a new-tab from the time you click, if you move the mouse over another folder in this short-timeframe then the folder currently hovered-over will be opened instead of the one you clicked on... (This one may be resolved with latest changes I made - please confirm if this happens to anyone.)

Bugs I may not be able to fix (unless I find a hack), i.e. Issues with Windows or DOpus:

Note: Some may be resolved, some may not be.. Testers are welcome. I am looking into a work-around but for now this works well enough for me so it isn't that big of a deal overall...

  • If you left click anywhere then left-click within the double-click timeframe on something else then double-click event will fire on the element currently hovered over (example, click on one folder then left [ or middle-click when the app is not active ] on another folder within the double-click time-frame and double-click will be executed despite not double-clicking one element).

  • If you left click anywhere then left-click within the double-click timeframe on something else then double-click event will fire on the element currently hovered over.

When I code something I like to do it right... I am releasing this early so you can use DOpus the same way you use every other tabbed application... Just because it works, doesn't make it right. - Josh 'Acecool' Moser

I'm logicizing the way to do this is to take it a step further from current method; i.e. since I can get the panel underneath the mouse I can also control aspects of it therefore I should be able to detect if something is already highlighted. Another way to hack the issue is to add another if / logical condition so if the application is currently active then do not apply the left-click...


AHK Script:

Standalone version (Save as DOpus_MiddleClick_Fix.ahk - or whatever and run it using AutoHotkey):

OLD - view a few posts below for latest!

NOTE: Latest version will always be posted in the first post but a record will be left as a history / backup to older versions in posts below the first post...

;;
;; Middle-Mouse Button Tabbed / MDI App Fix / Solution for DOpus - Josh 'Acecool' Moser
;;
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#singleinstance force


;;
;; CONSTants, ENUMeration, etc.. Variable Declarations
;;

;; Make sure these variables are accessible...
global DOPUS_APP_CLASS
global DOPUS_APP_PATH
global DOPUS_ICON_REFRESH_RATE
global DOPUS_ICON_APP_ACTIVE
global DOPUS_ICON_APP_HOVER
global DOPUS_ICON_APP_HOVER_LISTER
global DOPUS_ICON_APP_RUNNING
global DOPUS_ICON_APP_CLOSED
global DOPUS_FILE_LISTER_CLASS

;; Set the values ( You may need to alter the path )
DOPUS_APP_PATH				= C:\Program Files\GPSoftware\Directory Opus\dopus.exe

;; How many times per second should we check to see if the app is running ( Do NOT use 0 ) in order to update the script tray-icon?
DOPUS_ICON_REFRESH_RATE		= 10

;; What is DOpus Window Class-Name ( Don't change unless an update alters this )
DOPUS_APP_CLASS				= dopus.lister

;; What does the DOpus File-View Class-Name begin with ( Don't change unless an update alters this )?
;; Each tab has their own id which is appended to the string below.. ie if you have 2 tabs open, 1 is dopus.filedisplay1 and 2 is dopus.filedisplay2
DOPUS_FILE_LISTER_CLASS		= dopus.filedisplay

;; Which icon id should we use from dopus.exe to indicate the App is Running ( But not active )?
DOPUS_ICON_APP_RUNNING		= 9 ; Application Icon with DOpus Overlay

;; Which icon id should we use from dopus.exe to indicate the mouse is hovering over the App?
DOPUS_ICON_APP_HOVER		= 12 ; Application Icon with blue-square filling in the entire app area with DOpus Overlay

;; Which icon id should we use from dopus.exe to indicate the mouse is hovering over the File-Lister?
DOPUS_ICON_APP_HOVER_LISTER	= 4 ; Application Icon with blue-square at bottom right with DOpus Overlay

;; Which icon id should we use from dopus.exe to indicate the App is Running and currently Active?
DOPUS_ICON_APP_ACTIVE		= 26 ; DOpus icon with Check Mark Overlay

;; Which icon id should we use from dopus.exe to indicate the App is not running?
DOPUS_ICON_APP_CLOSED		= 8 ; DOpus icon with Red Exclamation Overlay


;;
;; DOpus Functionality Extension Script Starts Below... Shouldn't need to change anything below...
;;

;; Set the exact ms for our timer ( Do not alter )
DOPUS_ICON_REFRESH_RATE := ( 1000 / DOPUS_ICON_REFRESH_RATE )

;; Add dopus.lister to a custom group so the directive #IfWinExists works with a variable...
GroupAdd, APP_DOPUS, ahk_class %DOPUS_APP_CLASS%

;; Set the default tray icon ( Assume app isn't running )
Menu, Tray, Icon, %DOPUS_APP_PATH%, %DOPUS_ICON_APP_CLOSED%


;;
;; If Dopus Explorer Window Exists activate the following hotkeys.. IsActive is checked using Mouse hover to click when needed...
;;
#IfWinExists, ahk_group APP_DOPUS ;; #IfWinExists ahk_class dopus.lister
	;;
	;; Check to see if DOpus is running once per second... Would prefer a callback but I haven't found a built-in function for it so I may need to create a library..
	;;
	SetTimer, DOpus_HandleScriptTrayIcon, %DOPUS_ICON_REFRESH_RATE%


	;;
	;; Helper to change the TrayIcon of this script based on whether or not dopus is running, active, inactive, or not running.. Also used for debugging..
	;;
	DOpus_HandleScriptTrayIcon( )
	{
		;; If Not running used CLOSED. If Running and Active use ACTIVE. If Running and Not Active, use RUNNING.
		If DOpus_IsDOpusAppRunning( )
			if DOpus_IsMouseOverFileLister( )
				Menu, Tray, Icon, %DOPUS_APP_PATH%, %DOPUS_ICON_APP_HOVER_LISTER%
			else if DOpus_IsMouseOverDOpus( )
				Menu, Tray, Icon, %DOPUS_APP_PATH%, %DOPUS_ICON_APP_HOVER%
			else If DOpus_IsDOpusAppActive( )
				Menu, Tray, Icon, %DOPUS_APP_PATH%, %DOPUS_ICON_APP_ACTIVE%
			else
				Menu, Tray, Icon, %DOPUS_APP_PATH%, %DOPUS_ICON_APP_RUNNING%
		else
			Menu, Tray, Icon, %DOPUS_APP_PATH%, %DOPUS_ICON_APP_CLOSED%
	}


	;;
	;; Helper to determine whether or not DOpus is running..
	;;
	DOpus_IsDOpusAppRunning( )
	{
		;; If our window is already active, great... Otherwise see if the lister class is under mouse.. If both fail, nope...
		If WinExist( "ahk_class" . DOPUS_APP_CLASS )
			return true

		return false
	}


	;;
	;; Helper to determine whether or not DOpus is the currently active application...
	;;
	DOpus_IsDOpusAppActive( )
	{
		;; If our window is already active, great... Otherwise see if the lister class is under mouse.. If both fail, nope...
		If WinActive( "ahk_class" . DOPUS_APP_CLASS )
			return true

		return false
	}


	;;
	;; Helper to determine whether or not DOpus is directly under the mouse..
	;;
	DOpus_IsMouseOverDOpus( )
	{
		;; Grab information about the mouse position, window hovering over, and classNN
		MouseGetPos, _x, _y, _win_id, _control_raw
		WinGetClass, _class, ahk_id %_win_id%

		;; See if the class we're hovering over is in fact dopus...
		if _class = %DOPUS_APP_CLASS%
			return true

		;; It isn't..
		return false
	}


	;;
	;; Helper to determine whether or not DOpus File-List is directly under the mouse.. Returns true if the mouse is currently hovering over a file-display / file-list panel...
	;;
	DOpus_IsMouseOverFileLister( )
	{
		;; Grab information about the mouse position, window hovering over, and classNN
		MouseGetPos, _x, _y, _win_id, _control_raw

		;; Return the first 17 characters of _control_raw and return it as _control
		StringLeft, _control, _control_raw, StrLen( DOPUS_FILE_LISTER_CLASS )

		;; If _control starts with "dopus.filedisplay", return true ( Because dopus.filedisplay### is used, where ### is the tab-id starting with 1 )
		if _control = %DOPUS_FILE_LISTER_CLASS%
			return true

		;; It isn't...
		return false
	}


	;;
	;; Make Middle-Mouse Button Open New Tab in Background by clicking first ( Is also fired * if Shift, Alt or Ctrl is held down - ~ allows windows to run it too )...
	;; Note: We add Up because on SendInput MButton down, when we release this will fire and ~ ensures MButton can be released!...
	;;
	~*MButton UP::
		; Leave empty unless you want something else to happen ( You do not need to release MButton or LButton here - Windows does that because of ~ )...
	return


	;;
	;; Make Middle-Mouse Button Open New Tab in Background by clicking first ( Is also fired * if Shift, Alt or Ctrl is held down )...
	;;
	*MButton::
		;; Control Shift T -- Control Home ( If new version blocks Control Shit T ): Send ^{ Home }
		if ( ( DOpus_IsMouseOverDOpus( ) || DOpus_IsDOpusAppActive( ) ) && DOpus_IsMouseOverFileLister( ) )
		{
			;; Left Click if the app is not active even if modifiers are held because it needs to be made active.. Left Click if both control and alt aren't pressed.
			if ( ( !DOpus_IsDOpusAppActive( ) ) || ( !GetKeyState( "Control" ) && !GetKeyState( "Alt" ) ) ) ; && not GetKeyState( "Shift" )
				SendInput {LButton}

			;; If Alt is pressed we will be using Ctrl + Shift + W to restore tabs, otherwise use T to open tabs...
			if ( GetKeyState( "Alt" ) )
				SendInput ^+W
			else
				SendInput ^+T
		}
		else
		{
			;; If the mouse isn't hovering over DOpus and it isn't hovering over a file-display then we use our normal middle-mouse click...
			SendInput {MButton DOWN}
		}
	return

#IfWinExists

Lots of disclaimers, bug-report guidelines, windows internals and random other information here.
Can you describe in 3 sentences what this AHK script is for and what problem it (tries) to solve?

There were some issues with keys getting stuck but that should be resolved...

In short this script adds the same style of middle-click functionality which is seen in Google Chrome, Notepad++, and countless other MDI / Tabbed applications to DOpus Light tabs and file-lister for folders.. Middle click a tab to close it, Middle click a folder to open tab in background.

If you want to open multiple tabs in background highlight the folders and ctrl+middle-click. To re-open last closed tab alt+middle-click.

I coded it so the app doesn't need to be "active" for this to work, so if you're working in another application and need to open a new tab, you don't need to click DOpus first before opening a new tab; simply hover over the folder ( or tab ) and middle-click to open a new tab in background or close tab hovered over.

Ok, thank you. o)

As I understand it, if you want the same in Opus Pro you can do the following (without installing anything extra):

  1. Change Settings > File Types > All Folders > Events > Middle double-click to run:
    Go NEWTAB=findexisting.

  2. Turn on Preferences / File Displays / Mouse / Single middle click to trigger middle double-click events on background and files.

Yes, I tested if I could close tabs in unfocused DO windows with a middle mouse button click and it worked in Pro.
The options you mention help for opening new tabs, so most (all?) of this AHK scripting is really not necessary for DO12 Pro.

Might still be something for the DO Light userbase, if they know what an AHK script is for and how to run these. o)

There seems to be one issue with the script where the keys are still getting stuck some times.... Removing the spaces from { key down } to {key down} fixes it...

And yeah, this is mainly for light but does work in Pro - although if you edit the oxr you can have similar functionality in light.

Here's the latest:

;;
;; Middle-Mouse Button Tabbed / MDI App Fix / Solution for DOpus - Josh 'Acecool' Moser
;;
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#singleinstance force


;;
;; CONSTants, ENUMeration, etc.. Variable Declarations
;;

;; Make sure these variables are accessible...
global DOPUS_APP_CLASS
global DOPUS_APP_PATH
global DOPUS_ICON_REFRESH_RATE
global DOPUS_ICON_APP_ACTIVE
global DOPUS_ICON_APP_HOVER
global DOPUS_ICON_APP_HOVER_LISTER
global DOPUS_ICON_APP_RUNNING
global DOPUS_ICON_APP_CLOSED
global DOPUS_FILE_LISTER_CLASS

;; Set the values ( You may need to alter the path )
DOPUS_APP_PATH				= C:\Program Files\GPSoftware\Directory Opus\dopus.exe

;; How many times per second should we check to see if the app is running ( Do NOT use 0 ) in order to update the script tray-icon?
DOPUS_ICON_REFRESH_RATE		= 10

;; What is DOpus Window Class-Name ( Don't change unless an update alters this )
DOPUS_APP_CLASS				= dopus.lister

;; What does the DOpus File-View Class-Name begin with ( Don't change unless an update alters this )?
;; Each tab has their own id which is appended to the string below.. ie if you have 2 tabs open, 1 is dopus.filedisplay1 and 2 is dopus.filedisplay2
DOPUS_FILE_LISTER_CLASS		= dopus.filedisplay

;; Which icon id should we use from dopus.exe to indicate the App is Running ( But not active )?
DOPUS_ICON_APP_RUNNING		= 9 ; Application Icon with DOpus Overlay

;; Which icon id should we use from dopus.exe to indicate the mouse is hovering over the App?
DOPUS_ICON_APP_HOVER		= 12 ; Application Icon with blue-square filling in the entire app area with DOpus Overlay

;; Which icon id should we use from dopus.exe to indicate the mouse is hovering over the File-Lister?
DOPUS_ICON_APP_HOVER_LISTER	= 4 ; Application Icon with blue-square at bottom right with DOpus Overlay

;; Which icon id should we use from dopus.exe to indicate the App is Running and currently Active?
DOPUS_ICON_APP_ACTIVE		= 26 ; DOpus icon with Check Mark Overlay

;; Which icon id should we use from dopus.exe to indicate the App is not running?
DOPUS_ICON_APP_CLOSED		= 8 ; DOpus icon with Red Exclamation Overlay


;;
;; DOpus Functionality Extension Script Starts Below... Shouldn't need to change anything below...
;;

;; Set the exact ms for our timer ( Do not alter )
DOPUS_ICON_REFRESH_RATE := ( 1000 / DOPUS_ICON_REFRESH_RATE )

;; Add dopus.lister to a custom group so the directive #IfWinExists works with a variable...
GroupAdd, APP_DOPUS, ahk_class %DOPUS_APP_CLASS%

;; Set the default tray icon ( Assume app isn't running )
Menu, Tray, Icon, %DOPUS_APP_PATH%, %DOPUS_ICON_APP_CLOSED%


;;
;; If Dopus Explorer Window Exists activate the following hotkeys.. IsActive is checked using Mouse hover to click when needed...
;;
#IfWinExists, ahk_group APP_DOPUS ;; #IfWinExists ahk_class dopus.lister
	;;
	;; Check to see if DOpus is running once per second... Would prefer a callback but I haven't found a built-in function for it so I may need to create a library..
	;;
	SetTimer, DOpus_HandleScriptTrayIcon, %DOPUS_ICON_REFRESH_RATE%


	;;
	;; Helper to change the TrayIcon of this script based on whether or not dopus is running, active, inactive, or not running.. Also used for debugging..
	;;
	DOpus_HandleScriptTrayIcon( )
	{
		;; If Not running used CLOSED. If Running and Active use ACTIVE. If Running and Not Active, use RUNNING.
		If DOpus_IsDOpusAppRunning( )
			if DOpus_IsMouseOverFileLister( )
				Menu, Tray, Icon, %DOPUS_APP_PATH%, %DOPUS_ICON_APP_HOVER_LISTER%
			else if DOpus_IsMouseOverDOpus( )
				Menu, Tray, Icon, %DOPUS_APP_PATH%, %DOPUS_ICON_APP_HOVER%
			else If DOpus_IsDOpusAppActive( )
				Menu, Tray, Icon, %DOPUS_APP_PATH%, %DOPUS_ICON_APP_ACTIVE%
			else
				Menu, Tray, Icon, %DOPUS_APP_PATH%, %DOPUS_ICON_APP_RUNNING%
		else
			Menu, Tray, Icon, %DOPUS_APP_PATH%, %DOPUS_ICON_APP_CLOSED%
	}


	;;
	;; Helper to determine whether or not DOpus is running..
	;;
	DOpus_IsDOpusAppRunning( )
	{
		;; If our window is already active, great... Otherwise see if the lister class is under mouse.. If both fail, nope...
		If WinExist( "ahk_class" . DOPUS_APP_CLASS )
			return true

		return false
	}


	;;
	;; Helper to determine whether or not DOpus is the currently active application...
	;;
	DOpus_IsDOpusAppActive( )
	{
		;; If our window is already active, great... Otherwise see if the lister class is under mouse.. If both fail, nope...
		If WinActive( "ahk_class" . DOPUS_APP_CLASS )
			return true

		return false
	}


	;;
	;; Helper to determine whether or not DOpus is directly under the mouse..
	;;
	DOpus_IsMouseOverDOpus( )
	{
		;; Grab information about the mouse position, window hovering over, and classNN
		MouseGetPos, _x, _y, _win_id, _control_raw
		WinGetClass, _class, ahk_id %_win_id%

		;; See if the class we're hovering over is in fact dopus...
		if _class = %DOPUS_APP_CLASS%
			return true

		;; It isn't..
		return false
	}


	;;
	;; Helper to determine whether or not DOpus File-List is directly under the mouse.. Returns true if the mouse is currently hovering over a file-display / file-list panel...
	;;
	DOpus_IsMouseOverFileLister( )
	{
		;; Grab information about the mouse position, window hovering over, and classNN
		MouseGetPos, _x, _y, _win_id, _control_raw

		;; Return the first 17 characters of _control_raw and return it as _control
		StringLeft, _control, _control_raw, StrLen( DOPUS_FILE_LISTER_CLASS )

		;; If _control starts with "dopus.filedisplay", return true ( Because dopus.filedisplay### is used, where ### is the tab-id starting with 1 )
		if _control = %DOPUS_FILE_LISTER_CLASS%
			return true

		;; It isn't...
		return false
	}


	;;
	;; Make Middle-Mouse Button Open New Tab in Background by clicking first ( Is also fired * if Shift, Alt or Ctrl is held down - ~ allows windows to run it too )...
	;; Note: We add Up because on SendInput MButton down, when we release this will fire and ~ ensures MButton can be released!...
	;;
	~*MButton UP::
		; Leave empty unless you want something else to happen ( You do not need to release MButton or LButton here - Windows does that because of ~ )...
	return


	;;
	;; Make Middle-Mouse Button Open New Tab in Background by clicking first ( Is also fired * if Shift, Alt or Ctrl is held down )...
	;;
	*MButton::
		;; Control Shift T -- Control Home ( If new version blocks Control Shit T ): Send ^{ Home }
		if ( ( DOpus_IsMouseOverDOpus( ) || DOpus_IsDOpusAppActive( ) ) && DOpus_IsMouseOverFileLister( ) )
		{
			;; Left Click if the app is not active even if modifiers are held because it needs to be made active.. Left Click if both control and alt aren't pressed.
			if ( ( !DOpus_IsDOpusAppActive( ) ) || ( !GetKeyState( "Control" ) && !GetKeyState( "Alt" ) ) ) ; && not GetKeyState( "Shift" )
				SendInput {LButton}

			;; If Alt is pressed we will be using Ctrl + Shift + W to restore tabs, otherwise use T to open tabs...
			if ( GetKeyState( "Alt" ) )
				SendInput ^+W
			else
				SendInput ^+T
		}
		else
		{
			;; If the mouse isn't hovering over DOpus and it isn't hovering over a file-display then we use our normal middle-mouse click...
			SendInput {MButton DOWN}
		}
	return

#IfWinExists

And I did find a way to add middle-mouse click ( double click only though so with the single click acts as double click selected in options it works ) to the oxr thanks to a pm.

You shouldn't have to edit any oxr files directly, and it's usually not a good idea to. Those things can be edited via the Settings > File Types user interface.

Please consider to update your initial post with your updated script. Obsolete code always leads to confusion and irritation and only very few people like to scroll through the full thread to see what and why changed and where the most current version is to be found. Maybe take a look at some of the other script addin threads and how people around here tend to handle updates.

Updated latest code in the first post as suggested.

You can't use the configuration menu / key-binds menu to add middle-click actions.. You can only assign mouse actions to several very limited actions in certain menus which are hard to find ( I'd prefer if all key-bind / key-action / key-* options would be in one place rather than all over the place )...

I don't know what the File-Types Settings Dialog has to do with anything??? Actually, found it.. Settings > File-Types > All Folders > Events ...

But there is no way to add a new one unless you edit the OXR file and if you edit the oxr file it will work for Light where-as this file-types menu may not work for light..... There is no way to add single-mouse middle click from what I can see and I haven't found the code-name for it yet either so I have to use mouse middle double click option and the option to ensure single double click acts as double-click in the config menu.

Mouse events are defined in the File Types UI because you can make them do different things for different file types (and folders). In this case you only have to change the one event, on the All Folders type.

You don't need to edit any oxr files.

You can make the middle double-click events trigger on single click by changing a Preferences setting.

The two steps needed to do this in Opus Pro were described in my earlier reply in this thread and in your other thread:

That's all you need!