How do I set a folder as a realtive path to where the script is running??
is there any easy way like in unix, starting without / ?
or for example
"~/Desktop/"
"/users/<login>/desktop/"
seems that path to me is the only way...
is there an easy way to change posix paths to applescript??
I have this code:
tell application "Finder" to set templateFile to (container of (path to me) as string) & "Graficas FINAL ADQAT.ai"
with this error:
error "No se ha encontrado el archivo Macintosh HD:Users:Vibra:Desktop:Graficas FINAL ADQAT.ai." number -43 from "Macintosh HD:Users:Vibra:Desktop:Graficas FINAL ADQAT.ai"
the file is there how I change the filepath to be compatible with applescript??
Do you just want…
set MyFile to ((path to desktop) as text) & "Test.ai" as alias
tell application "Adobe Illustrator"
activate
open MyFile
end tell
This also works if both files are at the same location…
tell application "Finder" to set templateFile to (container of (path to me) as string) & "Test.ai" as alias
tell application "Adobe Illustrator"
activate
open templateFile
end tell
AppleScript paths are HFS colon separated, most apps like to be passed an AppleScript alias specifier UNIX is POSIX paths a slash separated…
North America
Europe, Middle East and Africa
Asia Pacific