Dopusrt is not reciving cmds from outside

hiya.

think there's something getting in the way of dopusrt.exe receiving cmds that are coming from any program other than the window cmd window.

been writing a dynamic ahk menu to show selections.
if I run...
C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe /info %temp%\filelist.txt,list
...from the windows command prompt window the filelist.txt is created, when running from AHK nothing happens, and the same from Flow Launcher where has similar Run feature built in.

I thought maybe I had the commands wrong so check Quick Access Popup, which has always done an awesome job of integrating dopus, and also, nothing is seen in its "Current Folders" menu

I'm on dopus v13.12.3 with win 10 2242 v 19045.2965.

Make sure they aren't running it elevated or under another user.

Other than that, it should make no difference which program runs the command, as long as the command line is correct.

hmm, I always run my scripts as admin with ui access otherwise AHK won't do much to manage windows own windows, e.g. the task manager, I can't move it with hotkeys if my window manager script isn't admin.

thou, I just turned off admin and ui access on them and the same, filelist.txt isn't being created.

I also just rolled back to v13.11, QAP is again seeing the open folder list

okay, perhaps nevermind, I rolled back and then forward again, it appears to working now. .... when ... Not running as Admin ...

is there any command to get around this admin block?

Don’t run things as admin unless they actually need to be. It breaks things because non-admin processes are blocked from sending messages to admin processes. (And several other issues.)

AHK probably has a way to run something normally even if the script itself is elevated.

Running the script as a non-admin does not work either:

run('"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /info %temp%\filelist.txt,list')

It works via cmd:

run(A_ComSpec ' /c "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /info %temp%\filelist.txt,list',, "Hide")

Edit:
If run as an admin, runAS changes permissions to work:

runAS "User", "Password"
run(A_ComSpec ' /c "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /info %temp%\filelist.txt,list',, "Hide")

There’s no difference to the command whether it’s run via cmd.exe or something else. The difference must be something else about the context it’s being run from.

(Elevation, current directory, env-vars and different command lines may affect it, but being launched in or out of cmd.exe doesn’t.)

Whether the AHK script is waiting for the command to finish or continuing in parallel may be another factor.

Using something like this works FWIW (for v.2.0) :

cmd := '"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /info "' A_Temp '\filelist.txt",list'
try 
 	RunWait(cmd, , "Hide")
catch
 	if A_LastError
    	MsgBox "dopusrt.exe /info could not be launched."

Yes, replacing %temp% with the AHK variable A_Temp worked.
run('"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /info ' A_Temp '\filelist.txt,list')

thanks y'all, ill play with a couple these.

now that I've the file created and read the harder part is figuring out the RegEx to find and extract the active\top most tab and selected file (if any).


furthermore, related to running AHK admin vs UI access.... what a hot mess that is!

if not run as admin or with UI access you can't control as much.

I have this button\key that will kill all AHK scripts running if I mess something up they start getting out of control, e.g. trapped in a loop or loosing input(s) controls

if not running as admin with UI access ON this button will not work because the AutoHotkeyU64_UIA.exe IS running as Admin. seeming a limited admin the admin can't get to? haha. So yeah. using RunAs as no affect here, hmm, maybe it would if turned it into a label rather than a function.

anyway, thanks again

■■■■ing■■■■() ;; Function
{
; RunAs, CLOUDEN, "%pswd%",
; RunAs, Administrator, MyPassword

run, cmd.exe /c "taskkill /f /im AutoHotkeyU64.exe"
sleep 100
run, cmd.exe /c "taskkill /f /im autohotkey.exe"
sleep 100
Run, cmd.exe /c "taskkill /f /im autohotkeyu32.exe"
sleep 100
run, cmd.exe /c "taskkill /f /im autohotkeyux.exe"
sleep 100
Run, cmd.exe /c "taskkill /f /im AutoCorrect_2.0.exe"
sleep 100
run, cmd.exe /c "taskkill /f /im autohotkey64.exe"
sleep 100
run, cmd.exe /c "taskkill /f /im AutoHotkeyU64_UIA.exe"
sleep 100
; RunAs  ; Reset to normal behavior.
return
}

Maybe take a look at QuickSwitch.ahk

I am using AutoHotkey v2, parsing XML via MSXML2 DOMDocument 6.0.

ha! I'm using QuickSwitch as reference :slight_smile:

the problem I'm encountering with trying to copy that is its using a . _thisID . var as an expression in its regex has it trying cover multiple file managers. I'm only intrested in building my dopus menu.

I spent hours yesterday trying to pull that out of there which ends up breaking the RegEx. Need more practice.

its coming along, this is my 1st rough draft, the menu items are not set yet.

I might share it when I'm done, if I can can work out making\reading dopus's .xml cmds

at them moment I have it set read the window title to get what's selected ( which won't work for everyone because I customized my title so I could grab this info out of it.)

I made one for Everything too.

I love these, my main geek-I-ness with them is to copy details\paths from these windows when they're in the back without brining them forward.

(post deleted by author)