To record a script:

Open Script Editor.

Click Record.

Perform the actions you want to record in the recordable application.

To stop recording, click Stop in Script Editor.
Some applications let you record actions using Script Editor. Recording is an easy way to create a simple script or start a more complex script. To determine if an application is recordable, try recording an action.
Script Editor only records actions that change a document, setting, or other aspect of the application. It doesn’t record actions such as clicking in a window or moving the pointer.
Open Script Editor.
Click Record.
Perform the actions you want to record in the recordable application.
To stop recording, click Stop in Script Editor.
The recorded script will need to be placed inside a tell statement to direct the script to the application.
Not all scriptable applications can record. If you can’t record actions for an application, the application isn’t recordable. For a list of recordable applications, see the Apple Scriptable Applications website.