WINFIND
Usage
TIBCO iProcess Workspace (Windows)
Warning: (iProcess only) This expression is not available to the TIBCO iProcess Script Server Plug-in. Therefore, even though you can successfully enter the expression in your iProcess Script plug-in definition, it will not be processed by the iProcess Engine. It will return SW_NA.
Find a window to perform an action on.
Syntax
WINFIND (title, modifier)
where:
• | title is a text string which specifies all or the first part of the title bar of the application window to be checked. Matching of the title is case insensitive. |
• | modifier is a numeric value which indicates what windows should be included in the search: |
Value |
Windows to search |
0 |
All top level and child windows |
1 |
All visible top level and child windows (i.e. not hidden) |
2 |
All top level windows |
3 |
All visible top level windows (i.e. not hidden) |
Returns
(numeric) The ‘handle’ of the window found. This value should be used when calling the WINACTION function. If a matching window cannot be found, or the modifier is invalid, the return value is 0.
Example
TIBCO iProcess Modeler:
In a script:
MYNUMFLD := WINFIND ("Microsoft Excel", 3)
IF MYNUMFLD >= 0
MESSAGEBOX ("Found Microsoft Excel.", "Window handle = " + STR (MYNUMFLD, 0), 0, 0)
ENDIF
TIBCO Business Studio:
MYNUMFLD=IPEEnvironmentUtil.WINFIND("Microsoft Excel",3);
if(MYNUMFLD >= 0) {
IPEEnvironmentUtil.MESSAGEBOX("Found Microsoft Excel.","Window handle = " + IPEConversionUtil.STR(MYNUMFLD, 0), 0, 0);
}