Re: Dialog simple question
Re: Dialog simple question
- Subject: Re: Dialog simple question
- From: "Mark J. Reed" <email@hidden>
- Date: Wed, 19 Oct 2005 16:14:29 -0400
On 10/19/05,
Bernard AZANCOT <
email@hidden> wrote:
Just another newbie question.
If I write :
set
itemcount to
count every
item of
folder theFolder_dok
set Dialog1
to "File(s) copied : " & itemcount
Everything is OK.
Now, if I write :
set
itemcount to
count every
item of
folder
theFolder_dok
set
Dialog1 to
itemcount & " file(s) copied."
I get no dialog.
I assume that in order to get your dialog you are doing something like
"display dialog Dialog1" later? Otherwise you'll get no dialog in
either case . .
Regardless, the reason (itemcount & "blah") is different from
("blah" & itemcount) is that the meaning of & depends on the
type of its left-hand argument. If that is a string, then it does
a string append; otherwise, it does a list append, creating a new list
as needed. Since itemcount is a number, not a string, the result
of (itemcount & " file(s) copied.") is a list: {itemcount, "
file(s) copied."}.
What you are looking for is this:
set Dialog1 to (itemcount as string) & " file(s) copied."
--
Mark J. Reed <
email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden