كيفية استخدام محرّر مستندات Google كمشغل كود

Waffa ‏2024-02-19, 21:14 مساء 63

كيفية استخدام محرّر مستندات Google كمشغل كود

 

يمكن استخدام محرّر مستندات Google كمشغل كود لكتابة وتشغيل التعليمات البرمجية باستخدام Google Apps Script.

 

إليك الخطوات:

 

1. إنشاء مستند جديد في محرّر مستندات Google.

 

2. اكتب التعليمات البرمجية في مستند.

 

3. حدد التعليمات البرمجية.

 

4. انقر على "إضافة" > "وظيفة إضافية".

 

5. ابحث عن "Google Apps Script".

 

6. قم بتثبيت الوظيفة الإضافية.**

 

7. انقر على "إضافة" > "وظيفة إضافية" > "Google Apps Script".

 

8. انقر على "تشغيل".

 

ستقوم الوظيفة الإضافية بتشغيل التعليمات البرمجية.

 

ملاحظات:

 

* تأكد من أن لديك الأذونات اللازمة لتشغيل Google Apps Script.

* يمكنك استخدام محرّر مستندات Google لكتابة وتشغيل أي نوع من التعليمات البرمجية التي يمكن تشغيلها باستخدام Google Apps Script.

* يمكنك أيضًا استخدام محرّر مستندات Google لكتابة وتشغيل التعليمات البرمجية التي يمكن تشغيلها باستخدام Google Cloud Functions.

 

موارد إضافية:

 

* Google Apps Script documentation: [https://developers.google.com/apps-script/](https://developers.google.com/apps-script/): [https://developers.google.com/apps-script/](https://developers.google.com/apps-script/): [https://developers.google.com/apps-script/](https://developers.google.com/apps-script/): [https://developers.google.com/apps-script/](https://developers.google.com/apps-script/): [https://developers.google.com/apps-script/](https://developers.google.com/apps-script/): [https://developers.google.com/apps-script/](https://developers.google.com/apps-script/): [https://developers.google.com/apps-script/](https://developers.google.com/apps-script/): [https://developers.google.com/apps-script/](https://developers.google.com/apps-script/)

* Google Cloud Functions documentation: [https://cloud.google.com/functions/docs/](https://cloud.google.com/functions/docs/): [https://cloud.google.com/functions/docs/](https://cloud.google.com/functions/docs/): [https://cloud.google.com/functions/docs/](https://cloud.google.com/functions/docs/): [https://cloud.google.com/functions/docs/](https://cloud.google.com/functions/docs/): [https://cloud.google.com/functions/docs/](https://cloud.google.com/functions/docs/): [https://cloud.google.com/functions/docs/](https://cloud.google.com/functions/docs/): [https://cloud.google.com/functions/docs/](https://cloud.google.com/functions/docs/): [https://cloud.google.com/functions/docs/](https://cloud.google.com/functions/docs/)

 

مثال:

 

لنفترض أن تريد كتابة برنامج Google Apps Script لطباعة "Hello, world!" على الشاشة.

 

إليك كيفية القيام بذلك:

 

1. افتح مستندًا جديدًا في محرّر مستندات Google.

2. أضف التعليمات البرمجية التالية إلى المستند:

 

javascript

function helloWorld() {

 Logger.log('Hello, world!');

}

 

 

3. حدد التعليمات البرمجية.

4. انقر على "إضافة" > "وظيفة إضافية".

5. ابحث عن "Google Apps Script".

6. قم بتثبيت الوظيفة الإضافية.

7. انقر على "إضافة" > "وظيفة إضافية" > "Google Apps Script".

8. انقر على "تشغيل".

 

سيقوم البرنامج بطباعة "Hello, world!" على الشاشة.

 

شارك المقالة