Re: [python-win32] COM Automation: Problem Accessing Property of Object

2018-05-22 Thread Emre CETIN via python-win32
Hello again, Finally I got it to work! Here it is: import win32com.client srf = win32com.client.gencache.EnsureDispatch('Surfer.Application') Plot = srf.Documents.Add(1) srf.Visible = True MapFrame1 = Plot.Shapes.AddImageMap(GridFileName="C:/test.grd") ImageLayer1 = MapFrame1.Overlays(1)

Re: [python-win32] COM Automation: Problem Accessing Property of Object

2018-05-22 Thread Emre CETIN via python-win32
Hi again, I solved the unexpected error I just posted by following this link: https://mail.python.org/pipermail/python-list/2008-July/509467.html There is said to: "Just in case, could you delete the contents of your gen_py directory (probably in %TEMP%\gen_py)"That did it. Now I was able to test

Re: [python-win32] COM Automation: Problem Accessing Property of Object

2018-05-22 Thread Tim Roberts
Emre CETIN wrote: > > Finally I got it to work! Here it is: > > |importwin32com.client srf >

Re: [python-win32] COM Automation: Problem Accessing Property of Object

2018-05-22 Thread Emre CETIN via python-win32
Thank you for your reply. I wanted to try it but for seom reason the code that has been running without a problem suddenly gave this error: import win32com.client srf = win32com.client.gencache.EnsureDispatch('Surfer.Application')  # after this line of code the error below is produced...

Re: [python-win32] COM Automation: Problem Accessing Property of Object

2018-05-22 Thread Tim Roberts
Emre CETIN via python-win32 wrote: > Hi, I've been looking for a solution to this question for some time > now. Hopefully you could help me out. There's a program (Golden > Software Surfer) that I have successfully automated using Python COM. > I normally am able to control every portion I need.

[python-win32] COM Automation: Problem Accessing Property of Object

2018-05-22 Thread Emre CETIN via python-win32
r: '' object has no attribute 'ShowColorScale' After searching on the net I found this question, asked here 10 years ago:[python-win32] COM automation: problem accessing property of derived object obtained from collection « python-win32 « ActiveState List Archives | | | | | | | | | |

Re: [python-win32] COM automation: problem accessing property ofderived object obtained from collection

2008-01-04 Thread Albert Strasheim
Hello all Finally managed to type the correct magic phrase into Google. Looks like I want CastTo: http://mail.python.org/pipermail/python-win32/2003-April/000914.html http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440493 Cheers, Albert ___