This is more a theoretical question more than anything, so I thought I’d pose it here.
Let’s say I have a file “_disclaimer.txt” that is used repeatedly when closing out a project, rather than having it sit in a folder on my desktop and having the script be dependent on that file being there to copy, paste, prepend/rename, is it possible to embed said file within the app’s packaged contents to do the same thing?
Sure. Put it in Contents/Resources and refer to it like this:
set theFile to path to resource "_disclaimer.txt"
Somehow I’m getting an error that it can’t find the asset. I have the path to resource happening inside a handler, could that be the problem (meaning that should reside outside of a handler)?
set theResource to (path to me as string) & "Contents:Resources:_disclaimer.txt"
No, it shouldn’t make any difference.