Directory Opus config paths checker (DOChecker)

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!

The value of variable cItem is defaultright,and it is a object.Alias type.
The defaultright path is empty, and you can see it in my screenshot,The value of the alias lastright also empty.
I added a condition in source code, it seems to be working.
if(cItem.path == null) continue;

Toolbar button configuration item function does not seem to be checked!
value Go PATH="E:\temp\formily-editor1"

@bytespiller using script on DOpus 12.23, I receive the following error:

Error at line 110, position 3
Invalid procedure call or argument (0x800a0005)

Please advise.

A new revision v0.99b is now available in the root post, it should fix the script choking on the built-in aliases which don't have a path defined (such as defaultright etc.).


@lcl thank you, on my config, these defaultright etc. point to desktop (and there's no way to edit them since they're built-in aliases). I've used your information to implement a fix.

Can you please clarify, I'm not sure what functionality you're referring to here?


@Chuck this is exactly the same issue that @lcl encountered (on a different line due to script updates).
Please try the new 0.99b revision, it should work now (it's a "blind fix" since I don't have a repro on my config though).

It works... Thanks!

1 Like

Thanks for the nice script, but DOCheckor cannot check failed path with the function value GO PATH="xxxxxxx" , I hope you can add it. :grimacing:
image

So you mean adding a new category which checks GO PATH in all the buttons on all the toolbars?
I didn't see Opus has an API for enumerating the user buttons I think, so it would be necessary to parse the XML config files directly, I used to do that but that's prone to breaking over time as Opus evolves, so I'm focusing on things for which there is an API in Opus.