如何从一个Google Apps脚本拨打电话到另一个Google Apps脚本中的某个功能? [英] How to make a call from one Google Apps Script to a function in another?

查看:91
本文介绍了如何从一个Google Apps脚本拨打电话到另一个Google Apps脚本中的某个功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从一个Google Apps脚本拨打电话到另一个功能有简便的方法吗?

我正在写两个脚本,一个应该使用另一个的功能。我希望这两者拥有不同的共享权限,但是,我不想将它们放在同一个项目中。



我似乎无法找到任何需要Xxx.gs类型的函数在文档中。

我发现这个:
从另一个类中调用函数/ file



但是如果我尝试从另一个文件中调用一个函数,我会得到xxx function not found错误。

$ b $正如Corey在文章中提到的那样,你需要使用

guide_libraries?hl = enrel =noreferrer>图书馆来做你想做的事情。
您不能在项目中使用其他项目的函数(但您当然可以使用来自项目内的不同脚本文件的任何函数

Is there an easy way of making a call from one Google Apps script to a function in another?

I'm writing two scripts, one which should use functions from the other. I want the two to have different sharing permissions, however, so I don't want to put them in the same project.

I can't seem to find any "require Xxx.gs" type function in the documentation.

I found this: Call functions from another "class" / file

But I get "xxx function not found" errors if I try to call a function from a different file.

解决方案

As Corey mentioned in the post you refer to you need to use libraries to do what you want. You can not use functions from another project in a project (but you can of course use any function from different script files inside a project)

这篇关于如何从一个Google Apps脚本拨打电话到另一个Google Apps脚本中的某个功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
其他开发最新文章
热门教程
热门工具
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆