• 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: 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.

References: 
 >Re: Booleans in AS (From: Olivier Destrebecq <email@hidden>)

  • Prev by Date: Re: Invisible comments (was: Re: Finder Tell Blocks)
  • Next by Date: IE and scripted mouse clicks
  • Previous by thread: Re: Booleans in AS
  • Next by thread: Re: Booleans in AS
  • Index(es):
    • Date
    • Thread