--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/629d889e-3fe4-4241-a492-ff7c5b275e30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
function main() {
showDialog();
rest of script...
}
function showDialog() {
var html = HtmlService.createHtmlOutputFromFile('Modal')
.setWidth(230)
.setHeight(105);
SpreadsheetApp.getUi()
.showModalDialog(html, 'Updating...');
}
<head>
<base target="_top">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
</head>
<body>
<h5>This could take awhile.</h5>
<p> <button class="btn-small waves-effect waves-light" type="submit"
onClick="google.script.host.close()" >Close<i class="material-icons right">play_circle_outline</i></button><P><P>
</body>
You can use the toast method of SS
On Thu, Jun 6, 2019, 4:51 AM Davis Jones <da...@eazl.co> wrote:
Hi GAS folks,--I've built a script for my team that takes a little while (~12 seconds) to load, because it's doing some heavy lifting on open. Is there any way that I can create some kind of progress bar or visual to let them know what's happening and, if possible, use some kind of progress graphic?This is what I'm talking about:
I'd love to build something custom instead of this "running script" dialog that comes up.
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-community+unsub...@googlegroups.com.
google.script.host.close()
<head> <base target="_top"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<script> window.onload = function() { //console.log('window.onload ran!');
google.script.run .withSuccessHandler(closeDialog) .mySidebarFunction() // initiates loading your sidebar };
window.closeDialog = function() { // closes your modal html when the sidebar loads google.script.host.close(); };</script>
</head>
<body> <h5>This could take awhile.</h5> <p> <button class="btn-small waves-effect waves-light" type="submit" onClick="google.script.host.close()" >Close<i class="material-icons right">play_circle_outline</i></button><P><P> </body>