• 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: David LeBer <email@hidden>
  • Date: Wed, 19 Oct 2005 16:16:02 -0400


On 19-Oct-05, at 3:37 PM, Bernard AZANCOT 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.
Known ?


itemcount is a number
"file(s) copied" is a string

In the first example AppleScript is auto coercing the number to a string because of the order it encounters them.

In the second example it doesn't. What you actually get is a list: {1, "file(s) copied"}

Try this:

set Dialog1 to (itemcount as string) & " file(s) copied."

--
;david

--
David LeBer
"I am codeferous!"
Codeferous Software
site:   http://www.codeferous.com
blog: http://david.codeferous.com




_______________________________________________ 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: Dialog simple question
  • Previous by thread: Re: Dialog simple question
  • Next by thread: Re: Dialog simple question
  • Index(es):
    • Date
    • Thread