I have a NIB file with custom fonts in it. SO I am checking “on open” that the user has the fonts installed on there system. If they don’t I would like to move the folder of fonts “appFonts” from my resources folder to their user/library/fonts folder. Problem is is that I don’t know how to get to my resources folder and address the “appFonts” folder
Thanks for the quick reply. I tried that and I am getting a error.
This is what I am trying to do
tell application "Finder"
try
set x to folder "Create Demo Report Fonts" of fontsdir
on error
set appFonts to ((path to me as text) & "Contents:Resources:appFonts:")
move appFonts to fontsdir
end try
end tell
tell application "Finder"
try
set x to folder "Create Demo Report Fonts" of fontsdir
on error
set appFonts to ((path to me as text) & "Contents:Resources:appFonts:")
duplicate folder appFonts to fontsdir
end try
end tell
You’re absolutely right. I completely overlooked this. But, to be technical, in AppleScript, you must use “//” before a space:
AppleScript, like many languages, uses “/” as an “ignore syntax” character. So, "/ " would be “ignore the space”. However, "// " is “ignore the slash before the space”. I think I’m being kinda unclear here, but I can’t think of a better way to explain it.
But, especially for new people to AppleScript, keep this in mind. It took me a while to figure out, and I think it’s a really valuable piece of information.
Also, I tried it in plain AppleScript (no Studio), and “quoted form of” didn’t seem to help the problem…