I have a script now that creates a big matrix based on all kinds of variables.
A few variables change periodically and their values are hard-coded so I need to update the script often.
How can I prompt a dialog and ask the user for some info and then use said info for a few of my variables? I just want a dialog with a couple text boxes for user input and an OK button to continue the script.
I have a script now that creates a big matrix based on all kinds of variables.
A few variables change periodically and their values are hard-coded so I need to update the script often.
How can I prompt a dialog and ask the user for some info and then use said info for a few of my variables? I just want a dialog with a couple text boxes for user input and an OK button to continue the script.
Share Improve this question edited May 24, 2013 at 12:43 Mogsdad 45.8k21 gold badges162 silver badges285 bronze badges asked May 9, 2013 at 14:34 Kyle LuchinskiKyle Luchinski 1531 gold badge4 silver badges18 bronze badges2 Answers
Reset to default 3Found it. You simply create your variable like this:
var buildVersion = Browser.inputBox("Build Version");
This will create a popup dialog that asks the user to input the "Build Version"
Good day,
In Google Sheets:
The following will pop up a dialog box prompting the user for input that can be assigned to a variable:
var YourVariableNameHere = browser.inputbox("Your Question Here");
It Creates a input-request-box that looks accordingly:
Inputbox
I have gone on to successfully use the variable to rename sheets, enter the variable into respective cells etc.