Oh, I should add - I am NOT generating a plugin, I'm using the scripting API from C++.
I've looked at your post in the SDK forum and here (thanks to Dirk for alerting me)--I have to say, you would be better off using either the C++ API or using scripting. Attempting to somehow merge the two will only lead to pain. Even using C#, rather than C++, would be an improvement--though there are many things that you cannot do using the scripting DOM from C#.
The thing is--there's nothing wrong with the TLB from VBScript's point of view. The majority of InDesign's properties and method parameters expect to work with Variants. This loose typing is by design--a scripter, when specifying a measurement unit, should be able to use either a double or a measurement override string (for example).
I hope this makes some kind of sense.
Thanks for the reply.
I've used C++ to automate many applications such as Excel, Word, etc. without problem in the, using the powerful #import mechanism of Visual C++ many times. I'd love to continue using it :-) I have no problem with using variants, although they do lack a little flavour.
When I get time I'll take a good look at the TLB as I do believe it's broken in some way but for now work pressure has driven me to a dirty hack solution, hehe.
I'll will just generate VBS and use wscript for the automation, and use C++ for the remainder of the problems I have to solve.
Understood--I was just trying to save you time and trouble.
It's possible that there is something about the way that the TLB is constructed that causes problems for this use--if you happen to figure out what it is, please let me know.
Hope this helps!
With the events showing up as duplicates (probably per supporting class) one idea is to step back a version and hope the matching TLB does not have the new "feature".
Is the quoted TLH file available from some temporary build folder? You could then extract all const BSTR and sort them to eliminate duplicates.
Another approach: some C# users have managed to decode the TLB and butcher them to their needs. Probably you mean that with "good look at the TLB" ...
Finally, along your current hack: you could continue to use your prototype, advance it towards regular VB and link to that from your VC++.
Thanks again guys.
I'm under pressure to provide a working solution so I don't have time for the elegance I normally enjoy :-)
I'll stick with the generate-script-and-execute-it dirty hack and hopefully in a week or two I'll be able to revisit the problem with a view to properly automating ID.