Re: simple duplicate script question
Re: simple duplicate script question
- Subject: Re: simple duplicate script question
- From: Doug McNutt <email@hidden>
- Date: Mon, 12 Mar 2007 08:45:44 -0600
At 14:19 +0100 3/12/07, Jacco Rens wrote:
>tell application "Finder"
> try
> set theDocumentsFolder to (path to documents folder)
> set theWorkFolder to (path to desktop folder)
> set ThisSjabloon to theDocumentsFolder & "sjabloon" as alias
> copy ThisSjabloon to theWorkFolder
> end try
>end tell
I sympathize. I can never figure out AppleScript syntax either. It's all guesswork.
I think the concatenation (theDocumentsFolder & "sjabloon") is not returning something that is recognizable as a fully qualified file name.
In Classic HFS you might need to add a colon in the text string but if it's OS neXt it might need to be a solidus. I think "path" is a UNIX thing and you're likely to have strings separated by solidus characters in the path to structures.
I would put some temporary display text commands after each line to see what's happening but the whole thing might be easier if you just forced everything to text using UNIX style directory separators. You could then do shell script "cp" which would avoid having to figure out AppleScript's usage of aliases.
You're probably not getting an error because of the try/end try statements. Comment them out for debugging.
You might also take the first three statements out of the tell finder block.
--
--> From the U S of A, the only socialist country that refuses to admit it. <--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden