michaelk Posted December 25, 2020 Share Posted December 25, 2020 I don't think I've ever been clear on this: I'm often writing scripts in BBEdit and using $INCLUDE and the path name more or less successfully. Tonight it's less successful. Does it matter what the suffix on the file name is? Is it different if the script is for a tool or if it's for a freestanding vectorscript? For tools I've been using .vs and it worked until tonight. A previously working tool won't run using $include, but when I copy and paste the exact same script into the script editor it works. For freestanding vectorscripts $include works until it doesn't. All of which leads me to believe there's something I'm not understanding. Quote Link to comment
JBenghiat Posted December 25, 2020 Share Posted December 25, 2020 The suffix does not matter — it just needs to match the file on disk, keeping in mind that .px is necessary if you want to encrypt scripts with includes. You may be experiencing an issue with the path. Paths are relative to where the script executes, so, for example, if included in a PIO, it’s relative to the PIO on disk. The path also accepts ../ to go up a directory. The same is going to be true of including a file from another include. Alternatively, you can specify an absolute path by starting with the hard drive, or on the Mac /Users, ~/, etc. If you’re just trying to consistently point to the right file, that’s usually the easiest method. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.