Directory Opus config paths checker (DOChecker)

This Directory Opus script-button checks your Opus config for invalid paths in: Favorites, Folder Aliases, Path Labels, Tab Groups, and Path Formats and presents the results in its GUI.

dochecker_pathlabels
You can use the "Open Prefs page" button to open the Opus Preferences page for the currently viewed category.

Usage:
After installation, click the new "DOChecker" button on your Opus toolbar, or if you don't want to install it, simply double-click the downloaded DOChecker.dcf file and Opus will execute it.

Download:

  • v0.99b, 2021-01-08: DOChecker.dcf (35.9 KB)
    Rewritten from scratch using new Opus APIs!
    Has some new features but also a few missing ones due to incomplete Opus APIs.
    • New in this version:
      • Rewritten from scratch and uses new modern Opus APIs for querying Opus Favorites etc. which is more future proof.
      • Optional FTP paths checking (disabled by default since it's slow and inconvenient).
      • Tab Groups layout is now simplified for more tidy code.
      • Improved locations icon display.
      • Larger font (inspired by this post).
      • Path Labels and Path Formats are currently not supported due to lack of APIs for them.
        • Shortcut button to edit these in the Prefs works, so you can view them manually for the time being.
        • There was some talk about these missing APIs recently, so if/when GPSoft adds them, I'll update this script to include this functionality again.

Version history
  • v0.99, 2021-01-06 DOChecker.dcf (35.6 KB)
    Rewritten from-scratch release using Opus APIs only.

  • v0.91, 2018-08-27
    Initial release before Opus had any APIs for this, since it's broken now, there's no download link anymore.


Adding the button to Opus toolbar (optional):

10 Likes

Nice idea, but when I tried the button, I got the following error:

Error at line 346, position 4
Object required (0x800a01a8)

:clap:

1 Like

Thanks for the report! I've found the similar (but on the other line) issue where it crashes if the Favorites entry had a blank "Name" property. The updated version 0.91 was uploaded, I hope this will fix your issue too.

Nice script! Found some old stuff in my own config. :slight_smile:

3 Likes

Works fine, now. Terrific and useful script. Well Done :grinning:

1 Like

Nice one, thanks.
Also pretty good example of a complete script in a button.

Great script, thanks @bytespiller :+1:

I don't know if this thread is still being watched by the author of this script, but I installed and ran the script to see if it would find anything and I continually get the same error in the Utility Panel:
11/5/2020 8:43 PM Error at line 343, position 3
11/5/2020 8:43 PM Subscript out of range (0x800a0009)

If it is user error causing this, please let me know, otherwise, I hope this is helpful in creating a more sound code for this much needed scanner!

Oh wow, two years passed already since this script was made, seems like yesterday, time flies!

Anyway, it's not just you, the script fails for me in the same way. It's simply no longer compatible with all the changes to Opus over the years.

The reason for this is that the script parses the config XML files directly (which was always unsupported by Opus itself, it was a hack).

In the meantime GPSoftware actually have added some APIs for querying lists of user's path aliases, tab groups etc. so I'd need to refactor & modernise my script, I'm not sure when I'll find time for that since I have some other projects currently in the pipeline, but I'd love to and will keep this in my mind.

You impressed the hell out of me for 1) responding at all to this ancient thread bump and 2) doing so in such a short amount of time. I'm glad that you are already aware of the issue, but does kinda suck your work went the way of the dinosaur.
And thank you for being constructive in your response and explaining the way you did as well - I really am trying to learn and build on the knowledge I have about this software and the languages it uses and its very beneficial to learn whatever I can (So I'm not always nagging @Leo lol) from people such as yourself that know a bit more.

Thanks!

No problem, btw the Discourse (software backend this forum uses) automatically sends an email to the topic author if there are new posts in their topics (even if they're over 2 years old), that's how I saw this so fast :smiley:

1 Like

A new rewritten-from-scratch version 0.99 is now available!

It comes with improvements (biggest one being that it should work :smiley: ), but there's a caveat where (for the time being) we don't have a Path Labels and Path Formats functionality due to missing Opus APIs (more info below).


Root post has been updated with a new download link and the following information:

Rewritten from scratch using new Opus APIs!
Has some new features but also a few missing ones due to incomplete Opus APIs.

  • New in this version:
    • Rewritten from scratch and uses new modern Opus APIs for querying Opus Favorites etc. which is more future proof.
    • Optional FTP paths checking (disabled by default since it's slow and inconvenient).
    • Tab Groups layout is now simplified for more tidy code.
    • Improved locations icon display.
    • Larger font (inspired by this post).
    • Path Labels and Path Formats are currently not supported due to lack of APIs for them.
      • Shortcut button to edit these in the Prefs works, so you can view them manually for the time being.
      • There was some talk about these missing APIs recently, so if/when GPSoft adds them, I'll update this script to include this functionality again.
4 Likes

Hot damn, you are a man of your word! I'm going to download and play around with this tonight since I was already in process of trying to clean up my Opus configuration anyhow. I will be sure to give you an update as to how it works for me. Thanks again man :sunglasses:

1 Like

hi,I have some problems
发生错误于 96,位置 3
无效的过程调用或参数 (0x800a0005)

Hi @lcl, this looks to be a problem with Folder Aliases.
I can't find a reason for it in the code, so there may be something weird in your config there.

I have two ideas how we could troubleshoot this if you'd like.
Can you please provide one (or both if possible) of the following:

  1. A screenshot of your Folder Aliases in the Directory Opus Preferences?
    Here is the screenshot of what I'm referring to (with option for built-in aliases turned off):

  2. Additionally, if you can, please go to /dopusdata\ConfigFiles and send me a folderaliases.oxc file in a private message (you can check it in a Notepad to see if there's no any private data there first).

okay
This is the folder aliases screenshot


the contents of the file folderaliases.oxc

<?xml version="1.0" encoding="UTF-8"?>
<folderaliases />
1 Like

@lcl I still wasn't able to pinpoint the problem, it seems as if it could be an Opus version problem.
Which version of Opus do you have exactly, and could you please try to update to a latest version 12.23 if not already on it?

@Leo judging from the error posted (I didn't manage to reproduce it), it seems as if the DOpus.aliases returns a non-empty vector with an item which doesn't have a path property, so the call DOpus.FSUtil.Resolve(cItem.path); in line 96 fails. Do you have any idea what could cause a DOpus.aliases to return a vector of object(s) without a path property?

Possibly the blank aliases (e.g. defaultright) or maybe one of the virtual folders that doesn't have a real path (although why that would only happen for some people/languages, I'm not sure, if it is that).

It could also be that the path is correct, but cannot be resolved. (e.g. A softlink to something that doesn't exist.)

You could put a try/catch around the line that's throwing the error, and make the script report which alias it's happening to. That might narrow down the cause.

1 Like

@lcl I've updated a root post with a new revision v0.99a, it will output a troubleshooting logs (and as a bonus may potentially work for you if the Folder Aliases was the only problem).

Can you please do the following:

  1. Download a version v0.99a from the root post.
  2. Run it, and the red "Script error" exclamation icon will flash in the Opus' UI, please click it, and send me a screenshot of the error logs.

The error log entries I'm mostly interested in will look similar to:

The alias "[Object]" is of an unexpected type: "object"

and

The alias "[Object]" doesn't have a path property!