Reputation: 2041
I am making some quick scripts to manipulate spreadsheets in my Google Drive. However I want to avoid the script accidentally running and modifying data before I know it works, or running additional times after it has done its job. Thus I would like to have a popup button/alert in the Google Script editor where the user (typically me) confirms that they want to continue running.
I have tried things such as getUi().alert(), but it seems to be more used when I distribute the script as an app. Any hints?
Upvotes: 0
Views: 533
Reputation: 11278
You cannot get alerts inside the Apps Script editor.
An option is that you add the debugger; statement in your code and then run the script in debug mode (Go to Run > Debug Function > function name).
The execution will automatically pause at places where the debugger statement exists.
Upvotes: 2