Jump to content

Disabling a button from an external application


Recommended Posts

Hi all,

I would like to disable the use of a specific buttton of an external application while the script is doing something else.

I found this:

Enables or disables mouse and keyboard input to the specified button

_GUICtrlButton_Enable($hWnd[, $fEnable = True])

So I looked for a way to get the button handle and I found this:

GUICtrlGetHandle ( controlID)

Problem: I don't know how to find the controlID of this button.

I found this but it doesn't work.

Any hint?

Link to comment
Share on other sites

look in the helpfile under Function ref > Window management > controls

A special description can be used as the controlID parameter used in most of the Control...() functions . This description can be used to identify a control by the following properties:

ID - The internal control ID. The Control ID is the internal numeric identifier that windows gives to each control. It is generally the best method of identifying controls. In addition to the AutoIt Window Info Tool, other applications such as screenreaders for the blind and Microsoft tools/APIs may allow you to get this Control ID

TEXT - The text on a control, for example "&Next" on a button

CLASS - The internal control classname such as "Edit" or "Button"

CLASSNN - The ClassnameNN value as used in previous versions of AutoIt, such as "Edit1"

REGEXPCLASS - Control classname using a regular expression

X \ Y \ W \ H - The position and size of a control.

INSTANCE - The 1-based instance when all given properties match.

use ControlGetHandle() with one of the above methods

GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...