Pathname Weirdness
Pathname Weirdness
- Subject: Pathname Weirdness
- From: Jonathan Piccolo <email@hidden>
- Date: Mon, 8 May 2006 10:38:27 -0400
Hey all,
I'm having all sorts of problems trying to work with file paths and I
was hoping someone could help demystify this for me or even point me
to some documentation on this. Here's a snippit of code that I'm
working on to sort of "copy protect" a script:
property antiPiracy : alias ((path to home folder as Unicode text) &
"Library:Preferences:")
if (not (exists folder ".aPCheck" of antiPiracy as string)) then
display dialog "This script was not installed correctly. Please
reinstall." buttons {"Quit"} default button 1
error number -128 --Quit was pressed
end if
Upon compilation, I get the following error: Syntax Error:
Expected “, ” but found “.
Then it highlights the first quotation mark in ".aPCheck"
In addition to why I'm getting this error, I'm confused about how to
store these paths so that they are properly passed/parsed, etc and I
believe this is the entire problem to begin with. Also, I'd like to
be able to pass on a path as a string to be compared with an actual
real path to verify a certain file/folders existence. In the past I
would get an error upon compiling that the file/folder in question
did not exist (I know!) and the script would never run (so
frustrating). I've not been able to do this successfully on several
occasions and have just made workarounds or eliminated the need for
these checks via hard-coding in paths (something I want to move away
from for portability reasons).
Any help for this newbie would be greatly appreciated!
Regards,
Jonathan Piccolo
---------------------------------------------------
email@hidden
http://www.callthemacwizard.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden