Multiple Script s in 1 project, Script application

I have an App script project with several html files and two scripts (Code.gs, Utilities.gs). I want to be able to call functions from Utilities.gs to Code.gs , but I don’t know how to communicate between two scripts in the same project. Is there a way to import / include scripts or something similar?

For example, if I have a function named getInfo() in Utilities.gs , I would call getInfo() in Code.gs. In java it will be Utilities.getInfo()

I do not see anything in the documents.

+6
source share
1 answer

You do not need to do anything, each function from all script files in one project is accessible from any script file ... separation in script files is only a convenient way to store things as you want. The project is the only "real" container.

+7
source

Source: https://habr.com/ru/post/972693/


All Articles