Import AppleScript methods in another AppleScript?

后端 未结 4 1053
萌比男神i
萌比男神i 2020-12-29 05:24

Is there a way to use defined AppleScript methods in other AppleScripts which reference the original AppleScript with something similar to import (f.e. in PHP)?

I wr

4条回答
  •  佛祖请我去吃肉
    2020-12-29 06:02

    Script Foo.scpt

    set theBar to "path:to:Bar.scpt" as alias
    run script (theBar)
    

    Script Bar.scpt

    display dialog "Bar"
    

    Result: A window that displays "Bar"

提交回复
热议问题