I'm trying to write several AppleScript scripts that share common functions. Ideally, they would include a separate file where these functions are defined.
Since this will be in a repository instead of locked to a particular machine, I can't rely on the script library directory to do it. I'm trying to load a script from a relative path.
But none of it seems to work. At first, I thought the problem was related to spaces in the directory name, but after doing a test where I include from a directory that does not contain spaces, it's clear that osascript
is finding the file and just refusing to open it.
error "Script doesn’t seem to belong to AppleScript." number -1752 from "/path/to/common.applescript"
What does this even mean, and how do I fix it?