Does Opus store open tab paths somewhere? (AutoHotKey script optimization question)

I'm working on an AutoHotkey script called QuickPath that lets you quickly switch paths in Windows Open/Save dialogs to match your currently open Directory Opus (or File Explorer) tabs.

Currently, the script reads DOpus tab information by creating a temporary XML file:

// In GetDOpusPaths() method:
tempFile := A_Temp "\dopus_paths.xml"
withSwitch := '"' this.dopusPath '" /info ' tempFile ',paths'
runWait(A_ComSpec " /c " withSwitch,,"Hide")
xmlContent := FileRead(tempFile)
FileDelete(tempFile)
paths := this.ParsePathsXML(xmlContent)

This works but involves writing and deleting temporary files frequently. I'm wondering if there's a more efficient approach? Does DOpus store open tab information somewhere that could be read directly, avoiding these I/O operations?

Thanks in advance for any suggestions!

You could use FlushConfig and parse

/dopuslocaldata\State Data\openlisters.oll

You can send a message to DOPus. I also posted a similar script in AutoHotkey forum.

DOpusRT.exe can get that information for you via a temporary XML file. (Despite using a file and XML, it's still very fast.)

https://docs.dopus.com/doku.php?id=reference:dopusrt_reference:retrieving_file_and_folder_information

Thank you for this suggestion. I see that .OLL files (or at least this one) is just an .XML file so this looks promising if I'll manage to get the script to parse it correctly.

Thank you, but I'm not sure I follow. What to you mean sending a message to DOpus?

Thank you, Leo. This is how the script currently works.
Very briefly, it checks if Opus is running, and if it does, it automatically gets the path to dopusrt.exe and stores it in a variable for portability (@WKen, this is following your suggestion in the AHK forum). To get the list of open tabs, it first creates a temp XML file, loads its content to memory, and then deletes it before it proceeds to display the list of paths.
The process is indeed fast, but the cost is repeated file creations and deletions, even if minimal all things considered, which I hoped I might be able to reduce.

A way for programs to communicate: AutoHotkey SendMessage and OnMessage

In fact, the xml file created each time hardly affects the speed and lifespan. It may only have a slight impact if a lot of tabs are opened.

Those really aren't an issue in Windows, and it's the intended way to do this.

Very well. It is settled then. I'll keep using the XML method.
Many thanks to everyone for your help.

1 Like