Syntax

do <commands> [in <object>]

do "set the name of button 1 to Cancel"
do "set the" && propertyName && "of button 1 to" && quote & "Hello World!" & quote
do "answer the name of me" in window "Other Window"

Explanation

Build some lines of script as a string and run it. The result of the script will be the result of the do command. The value of the variable it will be set to whatever it is in the script passed to do. Currently, other local variables used in the script will not be visible to the script that calls do.

in object

If you want to run a script so “me” refers to a different object than the current one, you can specify that other object using the in argument.