Powerpro and DirOpus

Does anybody else use Powerpro with Dir Opus (or any other scripting utilities)? I want to set a hotkey that will activate Directory Opus while it is resident in the System Tray. If I set a hotkey to run DirOpus from the command line, it will not do anything because it is loaded in the tray. I want to create a hotkey that will activate DirOpus just as double clicking the tray icon would do.

I use a script that will run a program if it is not already running or activate it (focus) if it is already running. That would bring it out of a sys tray or bring it to the front window if it was buried. That worked great with my previous file manager (xplorer2), but doesn't work that way with bringing DirOpus out of the minimized to tray state.

Is there a command that will accomplish this?

You can run any Opus command from outside of Opus using dopusrt.exe, e.g.

dopusrt.exe /cmd GO C:\ NEW
(to open a new Opus window showing C:)

or

dopusrt.exe /cmd Set LISTERCMD=ShowAll
(to bring all existing Opus windows to the front).

Thanks, I'm halfway there now. I was hoping that there would be a command that would activate a new lister if one wasn't already activated OR if one was already active, bring it to the foreground. I will try to script that out in Powerpro.

I don't quite understand the explanation - mainly cuz of the references to the 'system tray'? Does Opus have a setting to mimimize listers to the system tray instead of the taskbar?

Anyways, I think you're looking for dopusrt.exe /cmd Go NEW LASTACTIVELISTER.

But if Opus (dopus.exe) is already running as a process, why not use an Opus global hotkey to run just Go NEW LASTACTIVELISTER?

Thank you! That does exactly what I was looking for.

Do you not have DirOpus running in the system tray? That is the way mine loads on startup.

I wanted to assign this command to one of my spare mouse buttons like I did with my previous file manager. Now this works great using Powerpro to assign the command to mouse button 4.

Cool, works for you - works for me :slight_smile:. And yes, by default you get the sys tray icon - though I've turned mine off. I was just caught off guard by some of the references you made to it like "but doesn't work that way with bringing DirOpus out of the minimized to tray state". But anyhow, that you wanted to use it with a mouse button is the main thing that won't let you use Opus hotkeys... so it sounds like you're all set. Woohoo :slight_smile:.

Using a small script I have achieved all that I want. For anybody interested I show the powerpro script below. If there is an existing lister opened already, powerpro will bring it to the foreground. If no lister is already opened, it will open the default lister ("start" in my case). This assumes you create a shortcut to the default lister in your DirOpus directory.

Diropus.powerpro

if(anywindow("c=dopus.lister")) do window.show("c=dopus.lister") else do("C:\\Program Files\\Directory Opus\\Layout 'Start'.dcf") endif quit

The only difference between this and the Go NEW LASTACTIVELISTER is that if no lister is active, the script will open your default lister, not the last one you had opened.

Or, this doesn't need a shortcut;

if(anywindow("c=dopus.lister")) do window.show("c=dopus.lister") else do("C:\\Program Files\\Directory Opus\\dopusrt.exe","/cmd Prefs LAYOUT=start") endif quit

Hey there edbro... useful info for those of us inclined towards scripting.

One point of clarification though... 'start' is not your 'default lister'. It sounds like a layout you've created and most likely configured to be loaded whenever you double-click on the tray icon and/or desktop (mine is called 'my'). Go NEW LASTACTIVELISTER is indeed loading your actual 'default lister' layout. If you're seeing that it's loading the lister in the last folder you were in before closing a lister, it's most likely because your 'default lister' layout settings (including the starting folder) are constantly being updated by the Preferences->Layout->Update Default Lister settings when Listers are closed option being enabled (it's enabled by default). If you turn this option off, load your 'start' layout, then select the Settings->Set As Default Lister menu option... this is a one time manual operation that does the same as the Prefs option above (which basically runs 'Set As Default Lister' every time you 'close' a lister) and will sync your actual 'default lister' layout with that of your saved 'start' layout. Just FYI... it doesn't impact what you've got working for yourself at all (other than that you could still use LASTACTIVELISTER :slight_smile:).

Okay, my bad on using the term "default". I had DOpus set to open a saved lister "start" upon the double click of the tray icon. So, that was the "default" for me (even if it isn't really "default"). How's that for confusing?!