In the previous lesson your script opened Font
dialog box. But how can you be sure an expected window is displayed?
During robotic automation you need to be sure you are in the right place all the time. The window
command helps your script stay focused on the desired application window.
After pointing your script to the right window — Font
dialog box in this case — you can order the robot to press Tab key twice, enter font size value of 50 and then press Enter:
program notepadkeyboard Hello⋘enter⋙world!keyboard ⋘alt+o⋙fwindow fontkeyboard ⋘tab 2⋙50⋘enter⋙
Run the script. It should stop with an error, since fent window simply doesn't exist. Correct this typo with a proper window title — font
. Run the script again and see how your text grows big.
Note: You can check the titles of all active windows by pressing Ctrl+T or selecting Tools/Windows
menu.
In the next lesson you will learn how to use variables.