admin管理员组文章数量:1336660
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.
本文标签: javascriptUser Input in Google Spreadsheet ScriptStack Overflow
版权声明:本文标题:javascript - User Input in Google Spreadsheet Script - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742421736a2471795.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论