Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Directory Opus (dopus) filemanager, sendmessage alternative
#1
Dopus has a way to send scripts/commands to a dopus window without activating it using "dopusrt.exe".
The problem is that it always targets the dopus window which is in the top of the windows stack (z order) if there are multiple dopus windows open. OR it opens a new dopus instance. There was previously no way to target a specific window to send scripts/commands without activating the dopus window.

But now a special script has been created to address this issue. Read green comment in below code.

Macro Macro17
Code:
Copy      Help
;; The default way to select THIRD tab (0=first), without activating dopus
_s="2"
run "J:\DOPUS\dopusrt.exe" F"/acmd Go TABSELECT={_s}"

;; The default way to open 'C:\Program Files' in current tab, without activating dopus
_s="C:\Program Files"
run "J:\DOPUS\dopusrt.exe" F"/acmd GO ''{_s}''"



;; The below 2 examples are the same as the above, but now we use "RunWindow.js.txt"
;; to target a dopus window!
;; In the below 2 examples we use TITLE and wildcard '*' to target '#qm1#' in dopus window titles
;; I first saved a layout under the name '#qm1#' and then set the title for that layout
;; I then added the script "RunWindow.js.txt" from:
;; https://resource.dopus.com/t/runwindow-send-commands-to-a-specific-window/25289
;; I removed the '.txt' from the "RunWindow.js.txt", but it might also work WITH the .txt extension!

;; TO SET A LAYOUT:
;; First set the interface to your likings then from the upper menubar:
;; 'Settings' >> 'Lister Layouts' >> 'Save this lister'
;; I used the name '#qm1#' to save a lister layout (you can use any name you want)
;; I encapsulated the 'qm1' within '#' to give it a rather unique name which does not likely
;; to appear as a file/folder on my system. To elaborate, you might want to use the title
;; to extract the path. If another dopus instance is open it might also has a PATH opened with 'qm1'
;; in it. If you target on title, you might target the wrong dopus instance. That's why I have put
;; the layoutname within '#'. It's not bulletproof but it goes a long way.

;; TO SET THE TITLE:
;; First make sure you loaded the layout '#qm1#' , 'Settings' >> 'Lister Layouts' >> select '#qm1#'
;; Then set it's title, from the upper menubar: 'Settings' >> 'Preferences' >> 'Display' >> 'Options'
;; Check ONLY 'Custom title' >> in the inputfield: %L | %P
;; This shows in dopus titlebar: [LAYOUT NAME] | [FULL PATH]
;; example: #qm1# | C:\Program Files
;; Now using  TITLE=''#qm1#*'' , you can target dopus windows titles that contain '#qm1#'
;; note: 'CMD' must always be present!!!!


;; I used TITLE but on the page where you download the script you can also use:
;; - HWND:
;;   dopus window handle!
;; - LAYOUT:
;;   Do not confuse this with the example I gave. Because my example sets the TITLE using a LAYOUT.
;;   you can also target a dopus window that is loaded with a specific LAYOUT. So for example you can
;;   target a dopus window that has the LAYOUT 'test123' loaded.
;;   (If there are multiple, I assume it target's the topmost one)
;; Just read the page where you downloaded the "RunWindow.js.txt" from.

;; to select tab THIRD tab
_s="2"
run "J:\DOPUS\dopusrt.exe" F"/acmd RunWindow TITLE=''#qm1#*'' CMD Go TABSELECT={_s}"

;; to open 'C:\Program Files' in current tab
_s="C:\Program Files"
run "J:\DOPUS\dopusrt.exe" F"/acmd RunWindow TITLE=''#qm1#*'' CMD Go ''{_s}''"


Forum Jump:


Users browsing this thread: 4 Guest(s)