• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Reply to 'New to AS... What am I doing wrong? (CP)'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: Number stuff revisited
  • Next by Date: Re: do visual basic
  • Previous by thread: Number stuff revisited
  • Next by thread: Reply to 'New to AS... What am I doing wrong? (CP)'
  • Index(es):
    • Date
    • Thread