TO USE GOOGLE APPS SCRIPT |
||||
Documentation¬ | To search documentation, click here and add your key words¬ | Help forum¬ | Bug tracker¬ | |
NOTES |
||||
Gotchas and other ramblings on the new Google Apps Script. All dated since Google's updates may make them out of date
Script editor in Spreadsheets2011-08-05After making a copy of a spreadsheet, the spreadsheet displayed is the new copy. Any script window, however contains the script associated with the old spreadsheet. Script editor in Sites
2011-07-31 |
||||
ScriptProperties2011-07-31A ScriptProperties object is common to all gadgets containing the script, and all events within the script. Its keys and key values are retained across events. If a separate information needs to be stored for different gadgets using the same script, then pass a unique configuration parameter to the script, and use this as a key modifier. To create an on-sheet button 2011-09-05 Create a drawing, and save it. Click on the drawing, and then on the arrow at the top Select "Assign script" Enter the name of a function in the script attached to the spreadsheet [OK] Then to ensure that focus is restored back to the sheet ready for user input, within the script... 1. Select a different sheet 2. Do the work of the script 3. Re-select the original sheet. (See http://code.google.com/p/google-apps-script-issues/issues/detail?id=795 for the reasons, and add you comments, or click the yellow star to ask Google for a better solution. |
||||
To format a control<control>.setStyleAttribute('fontSize', 'XXpx'); .setStyleAttribute('fontWeight', 'bold'); .setStyleAttribute('paddingTop', 'XXpx'); .setStyleAttribute('fontFamily', 'Georgia'); .setStyleAttribute('paddingTop', '56px'); .setStyleAttribute('borderStyle', 'solid'); .setStyleAttribute('borderColor', 'black'); .setStyleAttribute('borderWidth', '1px'); .setStyleAttribute('paddingBottom', '50px') .setStyleAttribute('margin', '50px') sets space around the control .setStyleAttribute('marginTop', '5px') .setStyleAttribute('marginBottom', '50px') sets space below the control .setStyleAttribute('backgroundColor','rgb(255,128,128)') .setStyleAttribute('backgroundColor','#ff8080') |
||||
JAVA (applicable to Google Apps Script |
||||
For a random number between 1 and maxMath.floor(Math.random()*max+1) |
||||