Promotic
WikipediaLinkedInYoutubeTwitterFacebook

OtherAppOper - method of object Pm

Description:
Operation execution over the opened window of another application.
Syntax:
OtherAppOper(nMode As Long, sApp As String, nOper As Long, [vPar0 As Variant], [vPar1 As Variant], [vPar2 As Variant]) As Boolean
Calling:
b = Pm.OtherAppOper(nMode, sApp, nOper)
Parameters:
nMode(Long) The way how to find the window of another started application:
1 - The value of the sApp parameter corresponds to the whole title of the wanted window.
2 - The value of the sApp parameter corresponds to the beginning of the wanted window title text.
3 - The value of the sApp parameter is included inside the wanted window title.
sApp(String) Text that represents the window of another started application.
nOper(Long) Required operation over the started window of another application:
0 - Test if the window of another application is opened. Don't set the parameters vPar0, vPar1 and vPar2.
1 - Sending the Windows message to the window of another application (see the documentation Win32 API in OS Windows)
vPar0 (Long) - the code of the Windows message
vPar1 (Long) - the first parameter WPARAM of the Windows message
vPar2 (Long) - the second parameter LPARAM of the Windows message
10 - Closing window of another application (if it's a main window then closing the whole application). Don't set the parameters vPar0, vPar1 and vPar2.
11 - Moving the opened window of another application on top. Don't set the parameters vPar0, vPar1 and vPar2.
12 - Minimization of the opened window of another application. Don't set the parameters vPar0, vPar1 and vPar2.
13 - Maximization of the opened window of another application. Don't set the parameters vPar0, vPar1 and vPar2.
vPar0[optional] (Variant) The meaning depends on the operation (on nOper parameter).
vPar1[optional] (Variant) The meaning depends on the operation (on nOper parameter).
vPar2[optional] (Variant) The meaning depends on the operation (on nOper parameter).
Return Values:
true - Wanted window has been found and the operation has been successfully performed.
false - Wanted window hasn't been found or the required operation has failed.
Note:
Method enables to find if there is or isn't an opened window of another application in the system, identified by the window title (e.g. if it's opened the "Calculator" application at the moment, etc.), possible to execute the operation over the window of another application (e.g. close, minimize, move on top the window of the "Calculator" application).
 
This method is not functional for Web Panels.
See also:
Example1:
Test the existence of the Calculator window:
If Pm.OtherAppOper(1, "Calculator", 0) Then
  ...
End If
or
If Pm.OtherAppOper(3, "alculato", 0) Then
  ...
End If
Example2:
Exit the Calculator:
Pm.OtherAppOper 1, "Calculator", 10
Example3:
Moving the opened Calculator window on top:
Pm.OtherAppOper 1, "Calculator", 11
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- LN2
- OtherAppOper
 
 
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice