Wow... that was a LOT of information...
I ended up uninstalling 24.0 (2023) and reinstalling 23.5 (2022). I saved the object library from 2023 for comparison. Once I re-referenced the ScriptingSupport.8li and TypeLibrary.tlb files everything worked again. Some things I noticed:
- The 2022 object library appears in the solution explorer as "Interop Photoshop" while the 2023 library was just a {...class ID ? ...} with a load error symbol next to it
- initially the 2022 type library was no good, but I found an older one on the web that worked (it was 3K smaller but it loaded). When I reinstalled Photoshop 2022 both files could be referenced without any errors.
- the ScriptingSupport.8li files are almost identical, with the 2022 version being 11.5K larger. I'm willing to bet that if I reinstalled Photoshop 2023 the 2022 object library would work .
As far as how I'm using it, I have big plans, but for now I need to get a handle on the ActionDescriptor/ActionReference interface using ScripListener. To that end I wrote a utility called Eavesdropper that copies the ScripListener.8li file to the Plug-ins folder, starts Photoshop, then deletes the script logs to get rid of all the startup nonsense. Once the desired actions have been recorded the program moves the log(s) to a time stamped filename in a Snippets folder. When done recording, it shuts down Photoshop, waits for the process to exit, and deletes the plugin. You can then load the snippet into a proprietary editor that allows you to strip out all those superfluous lines like "SET objApp = CreateObject("Photoshop.Application")", remove unnecessary words like "SET" and "Call", and replace things like "idBrsh = objApp.CharIDToTypeID( "Brsh" )" with "PSConstants.phClassBrush" using a Dictionary object that contains all the CharID's and their corresponding type constants. This results in code that can be easily refactored into something a little cleaner for .NET to work with. It was originally just for my own use, but I've been building error checking into it so I can post it online at some point. It works quite well, is completely portable, and automates most of the painful tedium that ScriptListener can propagate.It's a simpl idea, but a very handy one...
