On Oct 19, 2005, at 12:37 PM, Bernard AZANCOT wrote:
set itemcount to count every item of folder theFolder_dokset 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.
Known ?
"Itemcount" is a number. In your first example, it comes after a string, and applescript coerces it into a string, and then concatenates it to the first string, and can then present the dialog.
In your second example, it comes before the string, and since Applescript can't coerce that string into a number, the concatenation results in a list, which can't be displayed in a dialog.
There are two ways to fix it:
1. set Dialog1 to "" & itemcount & " file(s) copied."
2. set Dialog1 to itemcount as text & " file(s) copied."
-- Michelle
--
If you don't hit any bumps in the road, you're not moving.