How to open a specific folder (imageview) by AutoHotkey

I want to open a specific folder by an AutoHotkey hotkey.
( I don't use directory opus in the background because of the little RAM. so I can't use the wide key made by dopus. )

Opening a folder by dopus, I want to :

  1. get a specific folder
  2. get a thumbnail view.
  3. the newest file at the beginning part

I tried this following script. But it doesn't work.
( I tried /cmd and /acmd )

#-::
run C:\Program Files\Directory Opus\dopus.exe, C:\Users\Sophie\Download /cmd Select DATE=oldest SETFOCUS DESELECTNOMATCH
Winwait ahk_clss dopus.lister
Send ^+h
return

my dopus version : version 12.23 x 64 (pro)
Windows setting : Windows 10 Home Single Language
Autohotkey version : AutoHotkey Unicode 64-bit, 1.1.33.9

How can i fix the issue?
Thanks for any help in advance.

I don't know if it's possible to send multiple commands at once but:

  • You should probably use the dopusrt.exe
  • You can combine /cmd and /acmd to achieve what you need

So it would go something like this (adapted from your example):

#-::
run C:\Program Files\Directory Opus\dopusrt.exe, /open C:\Users\Sophie\Download
Winwait ahk_clss dopus.lister
run C:\Program Files\Directory Opus\dopusrt.exe, /acmd Select DATE=oldest SETFOCUS DESELECTNOMATCH
; Note: you may want WinActivate here
Send ^+h ; Note: perhaps use the ControlSend instead to target the specific Opus window
return

Additional notes:

  • Instead of /open [path] (in the first line) you can use /cmd Go [path] instead (not 100% sure of the difference, try it).
  • Your downloads path may be incorrect (it usually ends with "Downloads" not "Download") if you really use that code.

Thank you for your help.
But every command in the script doesn't work.
ps. <Send ^+h> is to make thumbnailview.

That was just an example out of my head, it required some work from your part too :smiley:

So here is the actual verified working version:

#Warn UseEnv, Off  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.

#-:: ; don't forget to set your actual hotkey here
RunWait C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe /open %USERPROFILE%\Downloads
WinWait ahk_class dopus.lister
Send ^+h
Sleep 500 ; Allow half-second for Opus to open the new tab (may need increasing if your system is slower) before the next command.
RunWait C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe /acmd Select DATE=oldest SETFOCUS DESELECTNOMATCH
return
1 Like

It works.
Thanks a lot for your help. ^^;;