--- In [email protected], "entropyreduction" 
<alancampbelllists+ya...@...> wrote:
> 
> --- In [email protected], "entropyreduction" 
> <alancampbelllists+yahoo@> wrote:
> > 
> > ;added skipped_arg_marker
>  
> > com.set_arg_types
> > ;not necessary, default marker is "~~"
> > com.set_skipped_arg_marker("~~") 
> > win.debug(AppRef.CheckSpelling("HAX", "~~", 1), com_status)
> 
> Suggestions on default skipped_arg_marker please?
>

Yes, I like "~~" fine for the default. I had concerns about using high 
characters or control characters, "~~" is perfect. Using that would be a 
convenient alternative when skipping is the only necessary typespec (and 
assuming skipping issues can be resolved). I noticed btw that "t " isn't 
currently working the same in typespecs specified in com functions suffixed 
with "_typed" (generates error messages).

> In general, one send a server what it expects [..snip..]

> > "Even if a method accepts a VARIANT as opposed to a VARIANT *,
> > pointers can be passed indirectly via VT_BYREF|VT_VARIANT.
> > VBScript passes [in] VARIANTs in this fashion."

Recalling the earlier experiment to use it such a method for ferrying a 
VARIANT, a different com exception was reported (related to the InDesign Search 
digits-intead-of-string), but that could have been because of faulty error 
reporting:

ERROR: com.method: Invoke failed  (sys code 80020008: "Bad variable type.")

You said: "comPlugin0.72_100108.zip first tries guessing types, if that doesn't 
work tries a VT_BYREF|VT_VARIANT pointing to a VT_BSTR (at least that what I 
_think_ it's doing: but code is complicated and I really have to step it on 
something that previously, maybe still, throws an exception to be sure my logic 
is ok)."

Maybe you could do that with the wordApp.Help function. According to 
get_object_description, it is not optional and actually has an asterisk on the 
VARIANT.

These are the helpTypes in MSWORD.OLB per the ActiveX Documenter app:
 
Public Enum WdHelpType
        wdHelp=0
        wdHelpAbout=1
        wdHelpActiveWindow=2
        wdHelpContents=3
        wdHelpExamplesAndDemos=4
        wdHelpIndex=5
        wdHelpKeyboard=6
        wdHelpPSSHelp=7
        wdHelpQuickPreview=8
        wdHelpSearch=9
        wdHelpUsingHelp=10
        wdHelpIchitaro=11
        wdHelpPE2=12
        wdHelpHWP=13
End Enum

win.debug(wordApp.get_object_description("fdpt","Help"))
;function:  Help(IN VARIANT* helpType)
win.debug(wordApp.Help(4))
win.debug(com_status)
;ERRORS: com.method: Invoke failed  (sys code 80020009: "Exception occurred.")

As previously noted, in vbscript:

option explicit
Dim WordApp
Set WordApp = CreateObject("Word.Application")
WordApp.Help(4)
WordApp=Nothing

Error:  This method or property is not available because the command is not 
available on this platform.
Code:   800A11FD
Source:         Microsoft Word

If I use zero instead of 4 (powerpro still gets ERRORS: com.method: Invoke 
failed  (sys code 80020009: "Exception occurred.", vbscript gets:

Error:  This command is not available.
Code:   800A11FD
Source:         Microsoft Word


Reply via email to