Launch RobotSoft Calculator.
Note: Do not minimize the window. Background operations support inactive windows, but do not support minimized windows.
Launch Automatic Mouse and Keyboard, and use the “Find Window” command.
Click the function name FindWindowEx, and the click the popup menu “Pick Window“.
Find the window of RobotSoft Calculator, select it and then click “OK“.
Click the “ReturnValue“, then enter a variable name for the window handle. And then click “OK” to confirm the Call Function command.
Click the toolbox, then find “More Functions“, and then find “Background Operations“, and then click “Sub Window From Point“.
Click the function name SubWindowFromPoint, and then click the popup menu “Set Point“.
Then move mouse on to the Edit control of RobotSoft Calculator, and then press Ctrl to set the point. And then click “OK“.
Set the Window parameter and ReturnValue of SubWindowFromPoint. And then click “OK” to confirm the Call Function command.
Find the “Background Operations” again, and then click “Send String“.
Set the parameters of SendString, and then click “OK” to confirm the Call Function command.
Click the mouse button, and then click “Background Click“.
Click the function name Bkgnd_MouseClick, and then click the popup menu “Set Point“.
Then move mouse on to the “Calculate” button of RobotSoft Calculator, and then press Ctrl.
Then click “OK” to confirm.
Set the rest arguments of Bkgnd_MouseClick. And then click “OK” to confirm the Call Function command.
Now you can run the script.
And you will see the execution result:
While the script is running, you can still use your mouse and keyboard. Background operations are very useful features in Automatic Mouse and Keyboard. Automatic Mouse and Keyboard has the best tools to help you to build a script which can run in the background.
And you can download the sample from Background.amk.