Google Apps Script - introduction - 0 views
code.google.com/...guide_user_interfaces.html
google script apps Programming javascript tool tools infrastructure
![](/images/link.gif)
-
Google Apps Script provides you with the ability to build a user interface for displaying or capturing information.
- ...48 more annotations...
-
The built-in code autocomplete functionality in the editor requires you to type the trailing period that follows app.
-
you need a UiApp application object to contain the user interface elements. After you create the UiApp application object, you can add buttons, dialog boxes, panels, and other elements to the UiApp application object.
-
To create a UiApp application object, use the syntax var your_application_object_name = UiApp.createapplication();
-
To create a user interface element and associate it with your UiApp application object, use the syntax var your_ui_element_name= your_application_object_name.createElement_Name();.
-
Creating the elements and adding them to your application are separate steps requiring separate instructions.
-
how to use Grid objects and the setWidget method to create a more complex layout and also how to create text boxes and label them.
-
To make a user interface useful, you need the ability to update a Spreadsheet with information a user enters from the interface.
-
same script, with functions added that enable the form to be used multiple times before a user chooses to exit.
-
script collects some information from text fields on a panel and writes that information into the Spreadsheet.
-
You can make a script's user interface available to users from inside a Spreadsheet or Site or by running it separately as a service.
-
A script that provides a stand-alone user interface must invoke the doGet(e) function or the doPost(e) function for an HTML form submit.
-
The doGet(e) function takes the argument e, passing in the arguments for the user interface, including the user name of the person invoking the script.
-
After you write the script, you publish it as a service. During the publishing process, you define who has access to the script.
-
In a Google Apps domain, you can publish the script so that only you have access or so that everyone in the domain has access.
-
In a Google consumer account, you can publish the script so that only you have access or so that everyone in the world has access.
-
Updating a Spreadsheet from the User Interface, the user interface is displayed from the Spreadsheet where the script is stored. The following code defines how the user interface is displayed: