Set Position Size
ActionStep Reference » Windows » Operating System » Process » Set Position Size
The Set Position Size ActionStep sets the location (top and left coordinates) and dimensions (width and height) of the main window of a process.
- Open the Windows node in the Workspace Explorer.
- Open the Operating System node.
- In the Process node, select the Set Position Size ActionStep.
Parameters:
The ActionStep has the following input parameters:
name |
Description
|
---|---|
Process Id
|
The process identifier of the program.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Window Caption
|
The caption of the window on its tab or an empty string to ignore.
Allowed Context Scopes [Fixed, Local, Global] Allowed Value [Variable, Parameter, Enum] |
Position Left
|
The left position of the window to set.
Allowed Context Scopes [Fixed, Local, Global] Allowed Value [Variable, Parameter, Enum] |
Position Top
|
The top position of the window to set.
Allowed Context Scopes [Fixed, Local, Global] Allowed Value [Variable, Parameter, Enum] |
Window Width
|
The width of the window to set.
Allowed Context Scopes [Fixed, Local, Global] Allowed Value [Variable, Parameter, Enum] |
Window Height
|
The height of the window to set.
Allowed Context Scopes [Fixed, Local, Global] Allowed Values [Variable, Parameter, Enum] |
Example 1 (Set application window to the upper-left):
This example creates a local variable named Application Path to start an application and two local variables named Position Left and Position Top to set its position to the upper-left of the desktop. If the application successfully runs, a text is written on the application's workspace and stored as a text file in a designated folder. The result is then displayed via Message Box.
Example 2 (Set position and size of a searched process):
This example creates a local variable named Process Search with Text as its data type. The value is then used as an entry for a process to be searched. If the process is found, both the position and the window size are adjusted. The results are then displayed via Message Box.