• 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: Bernard Azancot <email@hidden>
  • Date: Thu, 20 Oct 2005 14:57:01 +0200


Le 19 oct. 05 à 23:41,  Chris Nebel wrote:

Date: Wed, 19 Oct 2005 13:27:39 -0700

From: Christopher Nebel <email@hidden>

Subject: Re: Dialog simple question

To: AppleScript Users <email@hidden>

Message-ID: <email@hidden">email@hidden>

Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed


On Oct 19, 2005, at 12: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 ?



Not just known, correct.  If you look at the execution error, you'll  

get a major clue.  The "&" operator behaves differently depending on  

the type of the left-hand operand: if it's text, you get a text  

result; if it's anything else, you get a list.  (This is documented  

in the AppleScript Language Guide.)  "Display dialog" can display  

text, but not a list.



--Chris Nebel

AppleScript and Automator Engineering


Nebel came and the fog went out from my eyes ! (Gerrman-english joke).

Thanks a lot Chris !
BA

 _______________________________________________
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

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