PushButton


 

PushButton>window_title,button_caption

 

Attempts to 'click' the specified button of the specified window.

 

window_title can contain an asterisk (*) as with all other window functions.  For buttons that have a hot key associated with them, and represented on the button by an underscored letter, pass a & character before that letter.  e.g.: for a button called 'Close', send &Close.

 

This command works by attempting to send the BM_CLICK message to the button when it finds a button in the specified window with the given caption.

 

This will only work with objects of the standard 'Button' class.  It may not work for all buttons on all windows.  For instance, it doesn't work for buttons on html documents in Netscape Navigator 4.05 or Internet Explorer 3.02, as they are not real buttons.  For these use the MouseOver command.

 

If the last character of the window title specified is an asterisk (*), Macro Scheduler will attempt to locate the first window whose title matches the text entered exactly. If it cannot make an exact match it then looks at all windows and stops at the first one it finds whose title contains the entered text. This solves the problem with applications such as Word or Netscape which change their titles depending on the document loaded. It is best to try to provide an exact (including case) window title to ensure the correct window is found, as many applications have multiple invisible windows with similar names.  Specifying text without a trailing asterisk will force Macro Scheduler to only look for an exact match.

 

window_title can end with an asterisk to indicate a substring match.  WF_TYPE, WIN_USEHANDLE and WIN_REGEX directives are also accepted.  See SetFocus for a more detailed explanation of how the asterisk, WF_TYPE, WIN_USEHANDLE and WIN_REGEX can be used to define how the window is located.

 

Abbreviation : PUS

See also: MouseOver

Example

 

Run Program>rundll32.exe shell32.dll,Control_RunDLL TimeDate.cpl

WaitWindowOpen>Date/Time Properties

...

PushButton>Date/Time*,OK