Created
May 19, 2011 06:34
-
-
Save taka2/980296 to your computer and use it in GitHub Desktop.
Button1押下時にTextBox1の内容を表示するGASスクリプト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Button1押下時のイベントハンドラ | |
| function myFunction(e) { | |
| var app = UiApp.getActiveApplication(); | |
| Browser.msgBox(e.parameter.TextBox1); | |
| return app; | |
| } | |
| //スプレッドシートオープン時 | |
| function onOpen() { | |
| var doc = SpreadsheetApp.getActiveSpreadsheet(); | |
| var app = UiApp.createApplication(); | |
| var mygui = app.loadComponent("MyGui"); | |
| var handler = app.createServerClickHandler("myFunction"); | |
| handler.addCallbackElement(app.getElementById("TextBox1")); | |
| app.getElementById("Button1").addClickHandler(handler); | |
| app.add(mygui); | |
| doc.show(app); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment