स्क्रिप्ट ट्रिगर के लिए सामान्य बिल्डर.
तरीके
| तरीका | रिटर्न टाइप | संक्षिप्त विवरण |
|---|---|---|
for | Document | यह फ़ंक्शन, दिए गए दस्तावेज़ से जुड़ा Document बनाता है और उसे दिखाता है. |
for | Document | यह फ़ंक्शन, दिए गए आईडी वाले दस्तावेज़ से जुड़ा Document बनाता है और उसे दिखाता है. |
for | Form | यह दिए गए फ़ॉर्म से जुड़ा Form बनाता है और उसे दिखाता है. |
for | Form | यह फ़ंक्शन, दिए गए आईडी वाले फ़ॉर्म से जुड़ा Form बनाता है और उसे दिखाता है. |
for | Spreadsheet | यह दी गई स्प्रेडशीट से जुड़ा Spreadsheet बनाता है और उसे दिखाता है. |
for | Spreadsheet | यह फ़ंक्शन, दिए गए आईडी वाली स्प्रेडशीट से जुड़ी Spreadsheet बनाता है और उसे दिखाता है. |
for | Calendar | यह फ़ंक्शन, कैलेंडर ट्रिगर बनाने के लिए बिल्डर ऑब्जेक्ट दिखाता है. |
time | Clock | यह फ़ंक्शन, समय के हिसाब से ट्रिगर बनाने के लिए Clock बनाता है और उसे दिखाता है. |
ज़्यादा जानकारी वाला दस्तावेज़
forDocument(document)
यह फ़ंक्शन, दिए गए दस्तावेज़ से जुड़ा DocumentTriggerBuilder बनाता है और उसे दिखाता है.
ScriptApp.newTrigger('myFunction') .forDocument(DocumentApp.getActiveDocument()) .onOpen() .create();
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
document | Document | दस्तावेज़. |
वापसी का टिकट
DocumentTriggerBuilder — The new DocumentTriggerBuilder.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, इनमें से एक या उससे ज़्यादा स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
forDocument(key)
यह फ़ंक्शन, दिए गए आईडी वाले दस्तावेज़ से जुड़ा DocumentTriggerBuilder बनाता है और उसे दिखाता है.
ScriptApp.newTrigger('myFunction') .forDocument('1234567890abcdefghijklmnopqrstuvwxyz') .onOpen() .create();
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
key | String | दस्तावेज़ का आईडी. |
वापसी का टिकट
DocumentTriggerBuilder — The new DocumentTriggerBuilder.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, इनमें से एक या उससे ज़्यादा स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/documents.currentonly -
https://www.googleapis.com/auth/documents
forForm(form)
यह दिए गए फ़ॉर्म से जुड़ा FormTriggerBuilder बनाता है और उसे दिखाता है.
ScriptApp.newTrigger('myFunction') .forForm(FormApp.getActiveForm()) .onFormSubmit() .create();
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
form | Form | फ़ॉर्म. |
वापसी का टिकट
FormTriggerBuilder — The new FormTriggerBuilder.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, इनमें से एक या उससे ज़्यादा स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/forms.currentonly -
https://www.googleapis.com/auth/forms
forForm(key)
यह फ़ंक्शन, दिए गए आईडी वाले फ़ॉर्म से जुड़ा FormTriggerBuilder बनाता है और उसे दिखाता है.
ScriptApp.newTrigger('myFunction') .forForm('1234567890abcdefghijklmnopqrstuvwxyz') .onFormSubmit() .create();
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
key | String | फ़ॉर्म का आईडी. |
वापसी का टिकट
FormTriggerBuilder — The new FormTriggerBuilder.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, इनमें से एक या उससे ज़्यादा स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/forms.currentonly -
https://www.googleapis.com/auth/forms
forSpreadsheet(sheet)
यह दी गई स्प्रेडशीट से जुड़ा SpreadsheetTriggerBuilder बनाता है और उसे दिखाता है.
ScriptApp.newTrigger('myFunction') .forSpreadsheet(SpreadsheetApp.getActive()) .onEdit() .create();
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
sheet | Spreadsheet | स्प्रेडशीट. |
वापसी का टिकट
SpreadsheetTriggerBuilder — The new SpreadsheetTriggerBuilder.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, इनमें से एक या उससे ज़्यादा स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
forSpreadsheet(key)
यह फ़ंक्शन, दिए गए आईडी वाली स्प्रेडशीट से जुड़ी SpreadsheetTriggerBuilder बनाता है और उसे दिखाता है.
ScriptApp.newTrigger('myFunction') .forSpreadsheet('1234567890abcdefghijklmnopqrstuvwxyz') .onEdit() .create();
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
key | String | स्प्रेडशीट का आईडी. |
वापसी का टिकट
SpreadsheetTriggerBuilder — The new SpreadsheetTriggerBuilder.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, इनमें से एक या उससे ज़्यादा स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
forUserCalendar(emailId)
यह फ़ंक्शन, कैलेंडर ट्रिगर बनाने के लिए बिल्डर दिखाता है.
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
email | String | उस उपयोगकर्ता के कैलेंडर का ईमेल आईडी जिसे ट्रिगर मॉनिटर करता है. |
वापसी का टिकट
CalendarTriggerBuilder — The new CalendarTriggerBuilder.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, इनमें से एक या उससे ज़्यादा स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.googleapis.com/auth/calendar.events -
https://www.googleapis.com/auth/calendar.events.readonly -
https://www.google.com/calendar/feeds
timeBased()
यह फ़ंक्शन, समय के हिसाब से ट्रिगर बनाने के लिए ClockTriggerBuilder बनाता है और उसे दिखाता है.
ScriptApp.newTrigger('myFunction').timeBased().atDate(2013, 10, 31).create();
वापसी का टिकट
ClockTriggerBuilder — The new ClockTriggerBuilder.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, इनमें से एक या उससे ज़्यादा स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/script.scriptapp