Re: Booleans in AS
Re: Booleans in AS
- Subject: Re: Booleans in AS
- From: Matthew Smith <email@hidden>
- Date: Thu, 07 Mar 2002 23:41:28 +1100
on 07/03/2002 23:10, John Cochrane at email@hidden wrote:
>
Andy Wylie wrote:
>
>
> 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
>
>
When I tried this successive folders were created named Test1, Test12,
>
Test123 etc. instead
>
of Test1, Test2, Test3 etc
>
I assume I have to conveert to number from text but as a relative
>
newcomer I had trouble
>
doing this. Any suggestions?
The line:
set folName to folName & cnt
is the problem. The first time folName is the concatentation Test and 1. The
next time it is Test1 and 2, the third Test12 and 3. Maybe the line should
be:
set newFolName to folName & cnt`V1and then use newFolName when making the folder.
Matthew
_______________________________________________
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.