Targetapp property, Waitforapp property – MagTek SENDKEYS.OCX User Manual

Page 8

Advertising
background image

SendKeys.OCX

4

TARGETAPP PROPERTY
Sets and returns the TargetApp property.

Syntax

SendKeys.TargetApp[ = value]

The TargetApp property syntax has these parts:

Part

Description

Value

A string value representing the
Target Application that will
receive the keystrokes.

Remarks

If TargetApp is left blank then the SendKeys control will send the keystrokes to the active
window. If the TargetApp property is not blank, the SendKeys control will activate the window
referenced by the TargetApp property. TargetApp should reference the application by the
name in the application title bar.

Example
SendKeys.TargetApp = “Untitled – Notepad”

Data Type
String



WAITFORAPP PROPERTY
Sets and returns the WaitForApp property.

Syntax

SendKeys.WaitForApp[ = value]

The WaitForApp property syntax has these parts:

Part

Description

Value

A Boolean Value representing
the status of WaitForApp.

Remarks

If WaitForApp is True then SendKeys.OCX will wait for the application that is using the
SendKeys.OCX to become active before it activates the TargetApp. If WaitForApp is False
then the TargetApp will be activated immediately.

Example
SendKeys.WaitForApp = False

Data Type

Boolean



Advertising