Re: Booleans in AS
Re: Booleans in AS
- Subject: Re: Booleans in AS
- From: Andy Wylie <email@hidden>
- Date: Thu, 07 Mar 2002 07:33:37 +1300
on 7/3/02 5:24 AM, Olivier Destrebecq at email@hidden wrote:
>
if not (folder "output" of folder myPath exists) then
>
make new folder at folder myPath with properties {name:2output2}
>
end if
>
for occasions when "2output2" may exist try...
tell application "Finder"
set {folName, cnt} to {"Test", 0}
set |exists| to (get exists of folder named folName of desktop)
repeat until |exists| = false
set cnt to cnt + 1
set folName to folName & cnt
set |exists| to (get exists of folder named folName of desktop)
end repeat
set newFolder to (make new folder at desktop with properties
{name:folName})
end tell
which I think is more effective than error trapping.
_____________________________ Andy
_______________________________________________
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.