Reply to 'New to AS... What am I doing wrong? (CP)'
Reply to 'New to AS... What am I doing wrong? (CP)'
- Subject: Reply to 'New to AS... What am I doing wrong? (CP)'
- From: email@hidden
- Date: Wed, 10 Mar 2004 14:44:31 -0500
I touched up your Code a little and it works here.
----- Code starts here -----
on main(fileList)
set s to ""
set templateFile to ""
set ctitems to count of items in fileList
repeat with i from 1 to ctitems
set s to s & ((item i of fileList) as string)
if i < ctitems then
set s to s & ":"
end if
end repeat
-- Next Line was added.
set s to s & ":" -- Added to place a ":" at End of s; which is
needed to distinguish a Folder Name from a File Name.
set the clipboard to (s as string)
--set templateFile to "Macintosh
HD:Users:cpruitt:Desktop:americanexpress.com/paperles.textClipping"
-- Notice the mixing of HFS+ and UNIX above? You use ":" of HFS+,
and then '/' of UNIX.
-- The above Line of Code was placed into two Variable for use with
'duplicate' Command.
set templateFile to "paperles.textClipping"
set templateFileFolder to "Macintosh
HD:Users:cpruitt:Desktop:americanexpress.com:" -- Please note the ":"
at the End.
tell application "Finder"
activate -- This is optional. use it if you want 'Finder' to
become the frontmost Process.
-- The 'duplicate' Command needs to know if it is a File or Folder
being duplicated.
duplicate (file (templateFile) of folder (templateFileFolder)) to
(folder (s)) with replacing -- 'with replacing' is optional.
end tell
end main
----- Code ends here -----
--
SJWL
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.