Recently I installed ImageGlass. This program has an option that if you sort your folder by name for example all the pictures in ImageGlass will get shown in alphabetical order if you open them from that folder. The same happens if you sort the folder by date taken and then open images in ImageGlass.
The option is called "Use Windows File Explorer sort order if possible" and does not work with Directory Opus. I made a feature request on GitHub but I got this response:
We can develop the feature " Use Windows File Explorer sort order if possible " thanks to Windows API. But the third-party app like Directory Opus does not provide API so it's impossible to know the sort order.
Now I wanted to ask, is there also such an API in Directory Opus? This program is so powerful and has so many options that I may have missed it. I understand this is a very niche question / request so I just wanted to know if something like this exists in Opus already or if there is some way to emulate the Windows API.
You can get the file order via scripting, but I'm not sure if that would make sense.
If they can tell of which API they're using, or which source file to look at, we might be able to implement the same one in Opus. (Although it can be complicated sometimes, as Opus windows can contain multiple folders/tabs, and can launch programs on files that aren't even in the current folder.)
The idea is Opus provides a command to retrieve the sort order (or even all the items in the list). For example:
Get sort order
# Command to get the sort order of the given directory
# It should return an integer corresponding to the sort order:
# 0: error
# 1: By name ascending
# 2: By name descending
# 3: By extension ascending
# 4: ...and so on...
opus.exe get-sort-order "C:\My photos\"