Does anyone know how to show a screen splash in Google App Script?. I want to show a screen splash while I check the rows of a spreadsheet. Thank you.
Create the Splash Screen as an HTML file in the script editor. Under File->New select Html file. Call the file test_HTML and place this inside the file:
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
Splash
</body>
<script>
setTimeout(myFunction, 3000)
function myFunction() {
google.script.host.close();
}
</script>
</html>
In Code.gs place the following:
function onEdit(e){
var splashScreen = HtmlService.createHtmlOutputFromFile('test_HTML')
.setHeight(600)
.setWidth(600);
SpreadsheetApp.getUi()
.showModalDialog(splashScreen, 'Dialog title');
}
In this case on and Edit of the document, the Splash Screen HTML will pop up and display for 3 seconds. You will have to modify this to work with your code, but should give you the basic principal of using the HTML Service as a splash screen.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments