When I double-click on a PDF File the File will open in whatever the default program is currently.
My question - is there a way to have a selection popup when I double-click on a PDF File which would show both Acrobat and Bluebeam and I could choose which program to use at that time?
.
You could have a popup menu via scripting, but a much easier way would be to add an item for each program to the PDF type's context menu and then right-click the files to choose a program.
(Settings > File Types, to add things to those menus.)
A script would be much better because I always forget to right-click, the script would eliminate that issue. Is it hard to write a script to do this? How much would it cost?
The other issue is opening a file attachment, which doesn't give a choice to open in one of the two programs, it all opens in the default one.
File attachments inside other software? That would be more complicated to solve, if you need it to apply to double-clicks (or other methods of opening the files) outside of Opus.
Thank you so much to you both - both scripts now work PERFECTLY and just what I was looking for!!!
It is a toss-up on which is better because 85% of the time I use Adobe (much quicker response), which would be two-clicks and BlueBeam (awesome for measuring) would be two-clicks plus the dropdown. Lxp's is genuinely nice also and always two-clicks.
I am going to try both for a while and see which one feels the best, because thanks to you two, I can...
Happy Days for Sure - A nuisance in my day is no longer and with this added knowledge, I could become dangerous and fix other things...
I wish all the software companies were as Great as the service and responses I always receive from DO...
I have been using this little pdf script you wrote for me a few months ago and it has worked flawlessly until yesterday. I must use it 30 times a day. Now I receive this error:
I can double-click the PDF in File Exploder and it opens the PDF file correctly. If I use "Open With" in DO it opens the PDF correctly. I am not sure what the heck the problem is, but I sure would love to have my little menu back.
Script:
function OnInit(initData) {
initData.name = 'LaunchPdf';
// initData.version = '2022-09-26';
// initData.copyright = 'LaunchPdf';
// initData.url = 'https://resource.dopus.com/t/menu-to-open-a-file-popup/42271';
initData.desc = 'LaunchPdf';
initData.default_enable = true;
initData.min_version = '12.0';
}
function OnAddCommands(addCmdData) {
var cmd = addCmdData.AddCommand();
cmd.name = 'LaunchPdf';
cmd.method = 'OnLaunchPdf';
cmd.desc = 'LaunchPdf';
cmd.label = 'LaunchPdf';
cmd.template = '';
cmd.hide = false;
cmd.icon = 'script';
}
function OnLaunchPdf(scriptCmdData) {
var cmd = scriptCmdData.func.command;
var tab = scriptCmdData.func.sourcetab;
var dlg = scriptCmdData.func.Dlg();
var fsu = DOpus.FSUtil();
cmd.deselect = false;
if (tab.selected_files.count == 0) return;
var item = fsu.Resolve(tab.selected_files(0));
var userChoice = dlg.request('Open With:','Adobe Acrobat Pro|Bluebeam Revu|Cancel');
if (userChoice == 0) return;
if (userChoice == 1) {
var cmdLine = '"C:\\Program Files (x86)\\Adobe\\Acrobat\\Acrobat.exe"';
} else {
var cmdLine = '"C:\\Program Files\\Bluebeam Software\\Bluebeam Revu\\2018\\Revu\\Revu.exe"';
}
cmdLine += ' "' + item + '"';
// DOpus.Output(cmdLine);
cmd.RunCommand(cmdLine);
}