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.