• 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
Re: Booleans in AS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Booleans in AS


  • Subject: Re: Booleans in AS
  • From: John Cochrane <email@hidden>
  • Date: Fri, 08 Mar 2002 00:30:23 +1100

"Paul F. Henegan" wrote:

> Try adding an additional variable newFolName so that you are making the
> changes to the same base name. It should look something like this:
>

Thanks Paul, Your script is more elegant than mine.
I had been trying to get files to arrange properly in a folder. When the suffix number
gets to 10 they tend to get out of order. By placing a well located space before numbers
less than 10 then they remain in order.
I adjusted the script to

tell application "Finder"
set {folName, cnt} to {"Test ", 0} --space after Test
set newFolName to folName
set |exists| to (get exists of folder named newFolName of startup disk)
repeat until |exists| = false
set cnt to cnt + 1
if cnt > 9 then set folName to "Test" --remove the space
set newFolName to folName & cnt
set |exists| to (get exists of folder named newFolName of startup disk)
end repeat
set newFolder to (make new folder at startup disk with properties {name:newFolName})
end tell

Cheers

John
_______________________________________________
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.

References: 
 >Re: Booleans in AS (From: "Paul F. Henegan" <email@hidden>)

  • Prev by Date: Re: Booleans in AS
  • Next by Date: Re: Get a file's icon???
  • Previous by thread: Re: Booleans in AS
  • Next by thread: Invisible comments (was: Re: Finder Tell Blocks)
  • Index(es):
    • Date
    • Thread