--- In [email protected], "entropyreduction" 
<alancampbelllists+ya...@...> wrote:
> 
> 
> If typspec is "s t s t "
> 
> That's consistent with a call like
> 
>   anObject.aMethod(astring1, "",  astring2, "")
> 
> or 
> 
>   anObject.aMethod(astring1, astring2)
> 
> The positioning of the "t " optional markers indicates location
> of parameters to be skipped or ignored. You can skip _all_
> parameters corresponding to optional "t " marker, or include them
> _all_.

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?

> 
> > 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)
    */

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:

Those lines presumedly result from a this line, somewhat before the deleted 
section:
showChildren("Main Wordpad menu", hAO)

> 
> 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))

The script line is:
local r=myselect.Search(unicode.new(chgVec[i,1]), wholeword, casesensitive, 
unicode.new(chgVec[i,2]))

(invocations below show the values from the 2d vector)

com.set_arg_types("retry") ;;same results without retry
AppRef.Search(abc,0,1,123)

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.

com.set_arg_types("retry") ;;same results without retry
AppRef.Search(456,0,1,def)

ERRORS: com.method: Invoke failed 
Error 770d:
from: C:\Program Files\Adobe\Adobe InDesign CS2\InDesign.exe
Invalid value for parameter 'For' of event 'Search'. Expected String, but 
received 456.

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)

------------------
Regarding comPluginDemoScriptwmi

ERROR: com.method: Can't handle type of returned value

Error occurred near line 62 of script comPluginDemoScriptwmi:
  if (dDrive.Size eq "") do

I think this was related debug output:
Drive C: contains 200047001600 bytes
Drive D: contains 119990349824 bytes
Drive  is not available.
Drive  is not available.

------------------
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)
------------------
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.

Regards,
Sheri


Reply via email to