2 viewers

Dear all,

Perhaps a stupid question but is it possible to choose from more viewers, based on an extension?

I assigned the next command to F3:
D:\UV\Viewer.exe {allfilepath}

It launches UniversalViewer with the selected file. Fine! But UV can't show all files (e.g. it can't show MSG-files).

I would like to change F3 into:

if (let's say) then extension = MSG (may be a regular expression: .*.msg)
then [launch] msgviewer {allfilepath}
else
[launch] viewer {allfilepath}

Thanks in advance!

Maybe you can do something with Settings>File Types. Maybe not for F3 but for for a mouse button.

No, that's not what I want.

I want to press F3 and then, depending on the filename, start the correct viewer.

You could use some VBScript (or similar) to do that.

If you want the script writing for you, please link your account.

Maybe it would be possible to setup Windows assignments and then call standard Windows action (I mean fe. open or view).

That's true, and you could use the Opus actions instead of the Windows ones to avoid having to mess with existing stuff.

e.g. Combine Stan's idea of assigning filetype actions to, say, Double Middle-Click + Alt, and then make the F3 hotkey run FileType ACTION=mdblclkalt

Thanks a lot but I don't wanna think about filenames and mouseclicks.

So it would be very nice if you could help me start writing some vbscriptcode. I am a vb.Net developer so I think it can't be difficult. But I have no experience with vbscript.

Thanks again!

Even nicer:

Consider expanding the modifiers:

Currently there is a ifpath modifier.

Perhaps a iffile modifier can be added?

Thanks!

[quote="rienvanham"]Thanks a lot but I don't wanna think about filenames and mouseclicks.

So it would be very nice if you could help me start writing some vbscriptcode. I am a vb.Net developer so I think it can't be difficult. But I have no experience with vbscript.[/quote]

Setting the hotkey up via mouse button events is actually much easier than using VBScript. :slight_smile:

[ul][li]Go to Settings -> File Types and open each of the types you are interested in.

[/li]
[li]To each one, add a Middle double-click + Alt event that runs the command you want for that type.

(See the example screenshot below.)

[/li]
[li]Now go to Settings -> Customize Toolbars -> Keys and (disable the existing F3 hotkey if it does something else and then) add a new F3 hotkey which runs:

FileType ACTION=mdblclkalt[/li][/ul]

That's it.


WOW!!

That works! Thanks a lot!

Kind regards,

Rien.