--- In [email protected], "Sheri" <sheri...@...> wrote:
>
> So what do you do? Do you test before processing (based on the number
> arguments actually received) whether you are dealing with skips, or omits or
> an erroneous typespec?
Yup, exactly. Then as processing params, skip or ignore depending on which
user plumped for.
> > > Hmmn. The script comPluginDemoScriptAccessible crashes Powerpro
> > > near the end.
> >
> > Can;t replicate. Can you pin down where it's crashing?
> >
>
> I can get it to process without crashing by commenting out these lines:
>
> /*
> local haoPaste = haoMenuPU.get_accessible_child("Paste\tCtrl+V", "menu
> item")
> win.debug("haoPaste: ", haoPaste)
> showChildren("Edit menu", haoMenuPU)
> */
Ahso. Wasn't doing proper error checking in
get_accessible_child/get_accessible_children,
and they wern't returning null string if they failed.
Try comPlugin0.72_100218.zip.
and the modified comPluginDemoScriptAccessible.powerpro therein.
> Then doesn't crash but there are these suspicious lines in the debug window
> (values missing?):
>
> Main Wordpad menu child 1: c_3003 Name: File; Value:
> Main Wordpad menu child 2: c_3004 Name: Edit; Value:
> Main Wordpad menu child 3: c_3005 Name: View; Value:
> Main Wordpad menu child 4: c_3006 Name: Insert; Value:
> Main Wordpad menu child 5: c_3007 Name: Format; Value:
> Main Wordpad menu child 6: c_3008 Name: Help; Value:
Not unusual AFAIK, for a menu item to have a name but no value.
> Those lines presumedly result from a this line, somewhat before the deleted
> section:
> showChildren("Main Wordpad menu", hAO)
Yup, that's what that function does.
> >
> > Your Search (Find?) method: the one that was unhappy with "3333"?
> > What error message do you get with retry on?
> >
>
> Keep in mind, I'm happy with the result. Also the tests work without error
> when the "for" and "replacingWith" parameters are in unicode handles.
>
> The TextFrame function:
>
> Objects BYREF Search(IN VARIANT for (optional), IN VARIANT wholeWord
> (optional), IN VARIANT caseSensitive (optional), IN VARIANT replacingWith
> (optional))
> ERRORS: com.method: Invoke failed
> Error 770d:
> from: C:\Program Files\Adobe\Adobe InDesign CS2\InDesign.exe
> Invalid value for parameter 'ReplacingWith' of event 'Search'.
> Expected String, but received 123.
That means my retry code isn't doing it's stuff. I'll have to find some
function that accepts only strings.
> I also tested all the other demos (except comPluginDemoScriptiTunes,
> comPluginDemoScriptExcel2002Speech and comPluginDemoScriptCreatePDF none of
> which I currently have needed components installed)
>
> I identified the following issues:
> ------------------
> Regarding comPluginDemoScriptWMInetworkAdapters
>
> ERROR: com.method: Can't handle type of returned value
>
> Error occurred near line 58 of script comPluginDemoScriptWMInetworkAdapters:
> outLine("Adapter Type: " ++ objNwrkAdpt.AdapterType)
> (and similar error for numerous other properties in this script)
could be coming back VT_EMPTY or VT_NULL, which dll in comPlugin0.72_100218.zip
not returns as null string. If still producing error, should now tell you the
type that it can't handle
> ------------------
> Regarding comPluginDemoScriptFileSysObj
>
> seems to work, but gets this error
>
> ERROR: com.release: Object handle, isn't
>
> Error occurred near line 73 of script comPluginDemoScriptFileSysObj:
> objFolderEnum = com.release(objFolderEnum)
> ------------------
Darn, that was a silly mistake. Fixed.
> Regarding comPluginDemoScriptImageMagick
> I couldn't create the object until I restarted Powerpro; I think the failure
> was due to the failure to release objects and/or unload the plugin in the
> other demo scripts I'd processed before this one.
Maybe; let me now if it still gets trouble.
Thanks for all the testing.