It is compiled when the script settings are changed.
When you view the changed script in the Designer, there will be an asterisk (*) on the top right corner of the script name or icon. This script will be targeted for compiling.
You can also compile from [Build] in the Designer. Refer to "Reference Information" link for the operation method of Designer.