On Sun, 9 Apr 2006 11:41:02, "Aleksandar Cikota" <[EMAIL PROTECTED]> wrote:
>
>
> 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
>
> Python code:
> import win32com.client
> FM = win32com.client.Dispatch('FocusMax.FocusControl')
> FM.Focus
>
> VBScript (that works):
> Set FM = CreateObject("FocusMax.FocusControl")
> FM.Focus
VB allows you to use a shortcut to call functions with no parameters, by
omitting the parentheses. Python does not. You need to use:
FM.Focus()
--
- Tim Roberts, [EMAIL PROTECTED]
Providenza & Boeklheide, Inc.
_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32