• 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: Dialog simple question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dialog simple question


  • Subject: Re: Dialog simple question
  • From: Michelle Steiner <email@hidden>
  • Date: Wed, 19 Oct 2005 13:18:09 -0700


On Oct 19, 2005, at 12:37 PM, Bernard AZANCOT wrote:

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

 _______________________________________________
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

References: 
 >Dialog simple question (From: Bernard AZANCOT <email@hidden>)

  • Prev by Date: Re: Dialog simple question
  • Next by Date: Re: Days and hours
  • Previous by thread: Re: Dialog simple question
  • Next by thread: Re: Dialog simple question
  • Index(es):
    • Date
    • Thread