Getting a specific shortcut to open in a new tab

What I want to this is really simple, but is proving a bit of a pain to do.

If I click on a shortcut that has a name of "_resources link" or "_repository link" then I want that shortcut to be opened in a new tab.

However, I could find no easy way of doing this so have reverted to to a vbscript hack.

I have placed this code in the "Left double-click" of the File Types>All files.

Here is the code

@runonce 
@nodeselect

RENAME FROM="{file$}" TO="{file$}"

@script vbscript
Option Explicit

' Change the path below if you haven't installed Opus to the default location:
dim DOpusRTPath
DOpusRTPath = "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe"

Dim Shell
Set Shell = CreateObject("WScript.Shell")

Function Rename_GetNewName(strFileName, strFilePath, fIsFolder, strOldName, ByRef strNewName)
	Dim strCommand
	Dim strFullFileName
	Dim bProcess

	strFullFileName = strFilePath & "\" & strFileName

	if right(strFullFileName,4) = ".lnk" then
		' shortcut
	
		Dim objShortcut
		Set objShortcut = Shell.CreateShortcut(strFullFileName)

		if ucase(strFilename) = ucase("_resources link.lnk") then
			bProcess = True
		end if
		if ucase(strFilename) = ucase("_repository link.lnk") then
			bProcess = True
		end if

		if bProcess = True then
			strCommand = """" & DOpusRTPath & """ /cmd Go " & """" & objShortcut.TargetPath & """" & " newtab"
			Shell.Run strCommand,0,false
		end if	
	else
		' other - perform a normal double-click operation
		' HOW?!?
	end if
	
	' Set strNewName to an empty string so that Opus does not rename the file.
	strNewName=""

End Function

The problem I have now is, obviously nothing happens for "normal" files.

What I need to do is somehow replicate a normal double click in DOpus, where I have put the "HOW?!?" comment. Either that or I need a totally new approach! lol

Any suggestions really appreciated.

Well... typically, not long after my original post I thought of a way to get it working.

I have created a new File Type Group called "Shortcuts" with just the .lnk extenstion

I have moved my code to the Left-Click of this file type group, therefore meaning the left click on other files now works as per normal.

Also, just slightly modified the code:

@runonce
@nodeselect

RENAME FROM="{file$}" TO="{file$}"

@script vbscript
Option Explicit

' Change the path below if you haven't installed Opus to the default location:
dim DOpusRTPath
DOpusRTPath = "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe"

Dim Shell
Set Shell = CreateObject("WScript.Shell")

Function Rename_GetNewName(strFileName, strFilePath, fIsFolder, strOldName, ByRef strNewName)
	Dim strCommand
	Dim strFullFileName
	Dim bProcess

	strFullFileName = strFilePath & "\" & strFileName

        Dim objShortcut
	Set objShortcut = Shell.CreateShortcut(strFullFileName)

	if ucase(strFilename) = ucase("_resources link.lnk") then
		bProcess = True
	end if
	if ucase(strFilename) = ucase("_repository link.lnk") then
		bProcess = True
	end if

	if bProcess = True then
		strCommand = """" & DOpusRTPath & """ /cmd Go " & """" & objShortcut.TargetPath & """" & " newtab"
		Shell.Run strCommand,0,false
	else
		strCommand = """" & DOpusRTPath & """ /cmd Go " & """" & objShortcut.TargetPath & """"
		Shell.Run strCommand,0,false
	end if
	
	' Set strNewName to an empty string so that Opus does not rename the file.
	strNewName = ""

End Function

Im still open to any suggestions people may have, but the above solution appears to work ok.

Are these things you only ever double-click within Opus?

Well, like any shortcut you double click on, I just wanted these specific shortcuts to open up in a new tab with the normal method of double clicking. I realise I could of used the Alt+Left Click etc, but ideally I wanted it on a normal double-click.