Enum EventType
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
نوع رویداد شمارشی که نوع رویداد راه اندازی شده را نشان می دهد.
برای فراخوانی یک enum، کلاس والد، نام و ویژگی آن را فراخوانی می کنید. به عنوان مثال، ScriptApp.EventType.CLOCK
.
خواص
اموال | تایپ کنید | توضیحات |
---|
CLOCK | Enum | هنگامی که رویداد زمان محور به زمان خاصی برسد، ماشه فعال می شود. |
ON_OPEN | Enum | هنگامی که کاربر فایل Google Docs، Sheets یا Forms را باز می کند، ماشه فعال می شود. |
ON_EDIT | Enum | هنگامی که کاربر فایل کاربرگنگار Google را ویرایش میکند، ماشه فعال میشود (به عنوان مثال، با وارد کردن یک مقدار جدید در یک سلول، که بهعنوان ویرایش بهجای تغییر حساب میشود). |
ON_FORM_SUBMIT | Enum | هنگامی که کاربر به فرم Google پاسخ می دهد، ماشه فعال می شود. این راهانداز یا در خود فرم Google یا در فایل کاربرگنگار Google که فرم پاسخهای خود را به آن ارسال میکند، موجود است. |
ON_CHANGE | Enum | هنگامی که کاربر فایل کاربرگنگار Google را تغییر میدهد، ماشه فعال میشود (بهعنوان مثال، با افزودن یک ردیف، که بهجای ویرایش بهعنوان تغییر حساب میشود). |
ON_EVENT_UPDATED | Enum | هنگامی که رویدادی در تقویم مشخص شده Google ایجاد، بهروزرسانی یا حذف شود، ماشه فعال میشود. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003e\u003ccode\u003eEventType\u003c/code\u003e is an enumeration used to define the type of event that triggers a script to run.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEventType\u003c/code\u003e enum includes properties such as \u003ccode\u003eCLOCK\u003c/code\u003e, \u003ccode\u003eON_OPEN\u003c/code\u003e, \u003ccode\u003eON_EDIT\u003c/code\u003e, \u003ccode\u003eON_FORM_SUBMIT\u003c/code\u003e, \u003ccode\u003eON_CHANGE\u003c/code\u003e, and \u003ccode\u003eON_EVENT_UPDATED\u003c/code\u003e, each corresponding to a specific event trigger.\u003c/p\u003e\n"],["\u003cp\u003eTo call an enum property, use the syntax \u003ccode\u003eScriptApp.EventType.PROPERTY_NAME\u003c/code\u003e, replacing \u003ccode\u003ePROPERTY_NAME\u003c/code\u003e with the desired event type (e.g., \u003ccode\u003eScriptApp.EventType.CLOCK\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThese event triggers allow scripts to automatically execute in response to various actions within Google Apps like Docs, Sheets, Forms, and Calendar.\u003c/p\u003e\n"]]],[],null,["# Enum EventType\n\nEventType\n\nAn enumeration denoting the type of triggered event.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nScriptApp.EventType.CLOCK`. \n\n### Properties\n\n| Property | Type | Description |\n|--------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `CLOCK` | `Enum` | The trigger fires once the time-driven event reaches a specific time. |\n| `ON_OPEN` | `Enum` | The trigger fires once the user opens the Google Docs, Sheets, or Forms file. |\n| `ON_EDIT` | `Enum` | The trigger fires once the user edits the Google Sheets file (for example, by entering a new value into a cell, which counts as an edit instead of a change). |\n| `ON_FORM_SUBMIT` | `Enum` | The trigger fires once the user responds to a Google Form. This trigger is available either in the Google Form itself or in the Google Sheets file that the form sends its responses to. |\n| `ON_CHANGE` | `Enum` | The trigger fires once the user changes the Google Sheets file (for example, by adding a row, which counts as a change instead of an edit). |\n| `ON_EVENT_UPDATED` | `Enum` | The trigger fires once an event gets created, updated, or deleted on the specified Google Calendar. |"]]