स्क्रिप्ट ट्रिगर के लिए एक सामान्य बिल्डर.
तरीके
तरीका | रिटर्न टाइप | संक्षिप्त विवरण |
---|---|---|
forDocument(document) | DocumentTriggerBuilder | दिए गए दस्तावेज़ से जुड़ा DocumentTriggerBuilder बनाता है और दिखाता है. |
forDocument(key) | DocumentTriggerBuilder | दिए गए आईडी से दस्तावेज़ से जुड़ा DocumentTriggerBuilder बनाता है और दिखाता है. |
forForm(form) | FormTriggerBuilder | दिए गए फ़ॉर्म से जुड़ा FormTriggerBuilder बनाता है और दिखाता है. |
forForm(key) | FormTriggerBuilder | दिए गए आईडी से फ़ॉर्म से जुड़ा FormTriggerBuilder बनाता है और दिखाता है. |
forSpreadsheet(sheet) | SpreadsheetTriggerBuilder | दी गई स्प्रेडशीट से जुड़ा SpreadsheetTriggerBuilder बनाता है और दिखाता है. |
forSpreadsheet(key) | SpreadsheetTriggerBuilder | दिए गए आईडी की मदद से, स्प्रेडशीट से जुड़ा SpreadsheetTriggerBuilder बनाता है और उसे दिखाता है. |
forUserCalendar(emailId) | CalendarTriggerBuilder | कैलेंडर ट्रिगर बनाने के लिए बिल्डर दिखाता है. |
timeBased() | ClockTriggerBuilder | समय के हिसाब से ट्रिगर बनाने के लिए, ClockTriggerBuilder बनाता है और दिखाता है. |
ज़्यादा जानकारी के साथ दस्तावेज़
forDocument(document)
दिए गए दस्तावेज़ से जुड़ा DocumentTriggerBuilder
बनाता है और दिखाता है.
ScriptApp.newTrigger('myFunction') .forDocument(DocumentApp.getActiveDocument()) .onOpen() .create();
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
document | Document | दस्तावेज़ |
रिटर्न
DocumentTriggerBuilder
— नया DocumentTriggerBuilder
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या ज़्यादा स्कोप से अनुमति देने की ज़रूरत होती है:
-
https://www.googleapis.com/auth/documents.currentonly
-
https://www.googleapis.com/auth/documents
forDocument(key)
दिए गए आईडी से दस्तावेज़ से जुड़ा DocumentTriggerBuilder
बनाता है और दिखाता है.
ScriptApp.newTrigger('myFunction') .forDocument('1234567890abcdefghijklmnopqrstuvwxyz') .onOpen() .create();
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
key | String | दस्तावेज़ का आईडी |
रिटर्न
DocumentTriggerBuilder
— नया 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();
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
form | Form | फ़ॉर्म |
रिटर्न
FormTriggerBuilder
— नया FormsBuilder
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या ज़्यादा स्कोप से अनुमति देने की ज़रूरत होती है:
-
https://www.googleapis.com/auth/forms.currentonly
-
https://www.googleapis.com/auth/forms
forForm(key)
दिए गए आईडी से फ़ॉर्म से जुड़ा FormTriggerBuilder
बनाता है और दिखाता है.
ScriptApp.newTrigger('myFunction') .forForm('1234567890abcdefghijklmnopqrstuvwxyz') .onFormSubmit() .create();
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
key | String | फ़ॉर्म का आईडी |
रिटर्न
FormTriggerBuilder
— नया FormsBuilder
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या ज़्यादा स्कोप से अनुमति देने की ज़रूरत होती है:
-
https://www.googleapis.com/auth/forms.currentonly
-
https://www.googleapis.com/auth/forms
forSpreadsheet(sheet)
दी गई स्प्रेडशीट से जुड़ा SpreadsheetTriggerBuilder
बनाता है और दिखाता है.
ScriptApp.newTrigger('myFunction') .forSpreadsheet(SpreadsheetApp.getActive()) .onEdit() .create();
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
sheet | Spreadsheet | स्प्रेडशीट |
रिटर्न
SpreadsheetTriggerBuilder
— नया स्प्रेडशीटBuilder
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या ज़्यादा स्कोप से अनुमति देने की ज़रूरत होती है:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
forSpreadsheet(key)
दिए गए आईडी की मदद से, स्प्रेडशीट से जुड़ा SpreadsheetTriggerBuilder
बनाता है और उसे दिखाता है.
ScriptApp.newTrigger('myFunction') .forSpreadsheet('1234567890abcdefghijklmnopqrstuvwxyz') .onEdit() .create();
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
key | String | स्प्रेडशीट के लिए आईडी |
रिटर्न
SpreadsheetTriggerBuilder
— नया स्प्रेडशीटBuilder
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या ज़्यादा स्कोप से अनुमति देने की ज़रूरत होती है:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
forUserCalendar(emailId)
कैलेंडर ट्रिगर बनाने के लिए बिल्डर दिखाता है.
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
emailId | String | उस उपयोगकर्ता कैलेंडर का ईमेल आईडी जिसे ट्रिगर मॉनिटर करता है. |
रिटर्न
CalendarTriggerBuilder
— नया 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
— नया ClockTriggerBuilder
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या ज़्यादा स्कोप से अनुमति देने की ज़रूरत होती है:
-
https://www.googleapis.com/auth/script.scriptapp