Re: Booleans in AS
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.