[pywin32-bugs] [ pywin32-Bugs-1014149 ] bug invoce method old automation server
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2004-10-08 06:33:33
|
Bugs item #1014149, was opened at 2004-08-23 17:50 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1014149&group_id=78018 Category: None Group: None >Status: Closed Resolution: None Priority: 5 Submitted By: Alexandr Zamaraev (shura_zam) Assigned to: Nobody/Anonymous (nobody) Summary: bug invoce method old automation server Initial Comment: I have old automation server "CorelDRAW.Automation.7" Bat tlb in its installation - incorrect. I try invoce method .GetSize In Help descriptions: .GetSize .XSize = long*, .YSize = long* This VB code work correct: Set C = CreateObject("CorelDRAW.Automation.7") Dim FileName As String FileName = "C:\S01.cdr" C.FileOpen FileName C.SelectAllObjects Dim X As Long Dim Y As Long C.GetSize X, Y Bat python code not work: C = win32com.client.Dispatch('CorelDRAW.Automation.7') try: C.FileOpen(C:\S01.cdr) try: C.SelectAllObjects #If I try invoce GetSize cx, cy = 0, 0 cx, cy = C.GetSize(cx, cy) ##Error: com_error: (-2147352571, 'Type mismatch.', None, 1) #but if i try cx, cy = C.GetSize(cx, cy) ##Error: com_error: (-2147352567, 'Exception occurred.', (1000, CorelDRAW 7, 'All argiments needed', Nonr, 0, 0), None) print cx, cy finally: pass finally: C.FileExit() del C What correct invoced method GetSize ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2004-10-08 16:33 Message: Logged In: YES user_id=14198 Try running 'makepy' on the object (or just use win32com.client.gencache.EnsureDispatch() in place of Dispatch(). That should work - please reopen the bug if it doesn't. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1014149&group_id=78018 |