Can i post a message to DOpus?

I want to make a few quick operations to DirectoryOpus by using autohotkey scripts.
For example, i want to sort by name when i click key 'v', but i don't want to make too many shortcuts in my DirectoryOpus's settings.
So i want to use PostMessage/SendMessage to do this, but i can't find any information about this.
Can anybody help me ? :slight_smile:

Sure, you can do virtually anything in Opus from Autohotkey by sending the commands through dopusrt.exe.
Essentially, you invoke dopusrt.exe and, as a parameter, you send the same Opus command that you would have used for the shortcut within Opus. In this case, it would like like this:

v::
Run "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /acmd SET SORTBY=name
return

Thank you! :smiley:

[quote="ashmid"]Sure, you can do virtually anything in Opus from Autohotkey by sending the commands through dopusrt.exe.
Essentially, you invoke dopusrt.exe and, as a parameter, you send the same Opus command that you would have used for the shortcut within Opus. In this case, it would like like this:

v::
Run "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /acmd SET SORTBY=name
return[/quote]

Why do you want to set up Opus hotkeys using Autohotkey rather than Opus itself? Seems like it just adds complexity to do it that way.

It's a good question, Leo. I was wondering the same thing. Here are a couple of scenarios that occurred to me in which it would be useful to use Autohotkey rather using an internal shortcut key:

1] The use of AHK scripts can simplify the transfer of shortcut keys from one computer to another. While it is true that Opus offers a backup-and-restore option to restore all of the shortcut keys at once, what happens if I want to send a small group of additional shortcut keys to someone who already has a configured Opus installation? For instance, I've had friends ask me for Opus shortcuts for certain things. In response, I create tutorial videos for them, showing them how to go into the Keyboard map, and how to enter the various parameters in the New Shortcut Key dialog for each item. However, with Autohotkey, I'd be able to just send them a .ahk file that they would put in their computer's Startup folder, which would automatically put a set of shortcut keys into effect, without the users having to create each shortcut key one by one. [Leo, is there an equivalent method within Opus whereby I'd be able to send a file to another user to automatically introduce a set of hotkeys into the user's Opus configuration?]

2] I have a number of custom non-standard keys on my keyboard, which have specific Virtual Key codes. As far as I know, these keys are not configurable within Opus's shortcut key dialog, but with Autohotkey they can be easily configured. [Again, Leo, correct me if I am wrong: is it possible to set shortcut keys within Opus according to virtual key codes?]

3] Finally, using an autohotkey script for my shortcuts would allow me to work on a friend's machine and temporarily put my entire set of Opus shortcut keys into effect, just for that session; exiting the autohotkey script would then instantly cancel all those extra hotkeys and return the user's Opus configuration to the way it was.

All that said, I do currently use Opus' internal shortcut mechanism for all my shortcut keys, and I imagine that using AHK would introduce some unnecessary complications. But the three scenarios above are cases in which the use of AHK would provide some benefit, I believe.

I just want to make it easier to use my Opus.
For example, when i type "sn", the list will sort by name, and "st" means the list will sort by time.
'k' --> move to next file.
'K' --> switch to next tab.
And all these settings will be disabled when i enter input mode.
:smiley:

Hi crpig,
Nice idea with the two-letter shortcuts.
Question: how do you instruct autohotkey to ignore the shortcut keys when in input mode?

  • Avi

[quote="ashmid"]Hi crpig,
Nice idea with the two-letter shortcuts.
Question: how do you instruct autohotkey to ignore the shortcut keys when in input mode?

  • Avi[/quote]
    Use A_CaretX and A_CaretY. When it's not input mode, A_CaretY is always 150 in my Opus. :smiley:

Does it change when you add/remove toolbars or enable/disable status bar, folder tree, viewer pane or metadata pane? Or is it always the same?

No ,it's not always the same.
Here 150 means the relative height that column headers to the main window.So if you change toolbar's height, the number will change too.
And if you enable/disable status bar, folder tree, viewer pane or metadata pane, i think the A_CaretY will be the same.
Here is an example code for autohotkey to get your A_CaretY in different situations.

^a::
if((A_CaretX) and (A_CaretY))
MsgBox, %A_CaretX%.%A_CaretY%
else
MsgBox, Empty
return