--- In [email protected], "Sheri" <sheri...@...> wrote: > Both filesystem and sapi scripts work. Sapi script fails an invoke at the end > because there is no speech.txt file in the scriptfoler. Filesystem script > contains erroneous com.param_type() and com.param_type("s") because latest > update has no such service. BTW, com documentation documents error dialog > services that don't exist.
Thanks, I'll fix. > But setback in existing Search script. Now doesn't work with or without > unicode arguments and crashes Powerpro, even without any use of > get_object_description. ActiveX Documenter http://vbaccelerator.com/home/VB/Utilities/ActiveX_Documenter/article.asp applied to your tlb returns Public Function Search(Optional ByVal For As Variant, Optional ByVal WholeWord As Variant, Optional ByVal CaseSensitive As Variant, Optional ByVal ReplacingWith As Variant) As Objects Right, we're into weird COM territory here. All Search() params are optional, which means they _have_ to be VARIANTs of type VT_VARIANT. When I look at functions taking optionals using in word com.get_object_description, they come out as VARIANT*. I haven;t yet figured out how to coerce a BSTR into a VARIANT with contains a pointer to another VARIANT; so I've just left any such param as a VT_BSTR and hoped the receiving app does the right thing. Works for word application object help method (which optionally takes a number). See what happens with your search thing, forgetting unicode handles for now. > Test of: > com.return_unicode_strings(1) > debug(myselect.contents) > quit Quite possible, I'm trying to get automatic recognition of parameter types to work correctly. comPlugin0.72_091203_2.zip may or may not be better. I'll look into unicode issues next week. > still debugs in ansi text (does not show a unicode handle label). > > > > > BTW what happens when you call > > appref.get_object_description (without any argument)? > > > > win.debug("desc", appRef.get_object_description) > > debugs desc _Application (with the underscore). appRef is created with > com.create_object("InDesign.Application.CS2") _Application sounds like the typical classname associated with highest-level app object. Word returns something similar.
