[python-win32] How to make Python identify GUI buttons by their label

2010-11-11 Thread ChristopherTom

The contractor we hired told us that Python can only recognize GUI objects,
specifically buttons, by their ID. This is very inconvenient and hard to
work with as the button IDs change a lot between builds. Instead, I want to
reference a button by its label like Save, Preview, or Submit. Does
anyone know how I can accomplish this?

We use ActiveState ActivePython 2.6.4.8 (32 bit), wxPython 2.8.10.1, and
PyScripter 2.3.3.

Thx in advance,
Christopher
-- 
View this message in context: 
http://old.nabble.com/How-to-make-Python-identify-GUI-buttons-by-their-label-tp30164133p30164133.html
Sent from the Python - python-win32 mailing list archive at Nabble.com.

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] How to make Python identify GUI buttons by their label

2010-11-11 Thread Tim Roberts
ChristopherTom wrote:
 The contractor we hired told us that Python can only recognize GUI objects,
 specifically buttons, by their ID. This is very inconvenient and hard to
 work with as the button IDs change a lot between builds. Instead, I want to
 reference a button by its label like Save, Preview, or Submit. Does
 anyone know how I can accomplish this?

I can't tell what this means.  Are you poking through another
application's window?  Typically, control IDs don't change that often. 
What do you mean by recognize?  Anything you can do from a C
application can be done from Python.  If you are searching for
subwindows, you can call the FindWindow API, which accepts titles.

-- 
Tim Roberts, t...@probo.com
Providenza  Boekelheide, Inc.

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32