To stop the script, press Esc on Windows (or Command-period on macOS). You can also select Edit > Stop Script. On macOS, Edit > Stop Script is available only when the script is running.