Enum EventType
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
EventType
ספירה שמציינת את סוג האירוע שהופעל.
כדי לקרוא למאפיין enum, צריך לקרוא לכיתה ההורה, לשם ולנכס שלו. לדוגמה,
ScriptApp.EventType.CLOCK
.
מאפיינים
נכס | סוג | תיאור |
CLOCK | Enum | הטריגר מופעל כשהאירוע המבוסס-זמן מגיע לשעה ספציפית. |
ON_OPEN | Enum | הטריגר מופעל ברגע שהמשתמש פותח את הקובץ ב-Google Docs, ב-Sheets או ב-Forms. |
ON_EDIT | Enum | הטריגר מופעל אחרי שהמשתמש עורך את הקובץ ב-Google Sheets (לדוגמה, מזין ערך חדש בתא, שנחשב לעריכה במקום לשינוי). |
ON_FORM_SUBMIT | Enum | הטריגר מופעל אחרי שהמשתמש משיב לטופס Google. הטריגר הזה זמין בטופס Google Forms עצמו או בקובץ Google Sheets שאליו נשלחות התשובות מהטופס. |
ON_CHANGE | Enum | הטריגר מופעל ברגע שהמשתמש משנה את הקובץ ב-Google Sheets (לדוגמה, הוספת שורה, שנחשבת לשינוי במקום לעריכה). |
ON_EVENT_UPDATED | Enum | הטריגר יופעל אחרי שייווצר, יתעדכן או יימחק אירוע ביומן Google שצוין. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\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. |"]]