[python-win32] Code help

Aleksandar Cikota alexci at gmx.net
Sun Apr 9 11:41:02 CEST 2006


Hi all,
 
I started to write a software for our future robotic telescope in Python. We
decided that we will use FocusMax for focusing:
http://users.bsdwebsolutions.com/~larryweber/
but I have a problem with focusing. 
 
FocusMax.FocusControl.Focus starts the auto focus operation and returns when
Focus is complete. This Method has the same effect as if the user clicked
the Focus button on the Focus tab (in FocusMax), but there is no reaction
and  I don't get any error message.

It works in Visual Basic Script, I have tryed it, but it doesn't work in
Python. Why? I'm a beginner in programming and I hope that You can help me. 
I have send you a part of the code in Python. It should work, but it doesn't
 I think the problem is here:
FM = win32com.client.Dispatch('FocusMax.FocusControl'), but I don't know
what is the problem.



Python code:
import win32com.client
FM = win32com.client.Dispatch('FocusMax.FocusControl')
FM.Focus


VBScript (that works):
Set FM = CreateObject("FocusMax.FocusControl")
FM.Focus


I would be very thankful, if you try to help me!
 
 
For your prompt reply, I say thank you in advance.
 
Best regards,
Aleksandar Cikota (Croatia)
 
 
 
-----------------------------------------
Aleksandar Cikota
MSN: Aleksandar_Cikota at hotmail.com
SkyPe: Aleksandar_Cikota
e-mail: alexci at gmx.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20060409/c0377025/attachment.html 


More information about the Python-win32 mailing list