• 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: set clipboard fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set clipboard fails


  • Subject: Re: set clipboard fails
  • From: Axel Luttgens <email@hidden>
  • Date: Fri, 26 Oct 2012 11:15:01 +0100

Le 25 oct. 2012 à 23:33, Shane Stanley <******> a écrit :

> On 26/10/2012, at 9:15 AM, Axel Luttgens <******> wrote:
>
>> 	tell application "System Events"
>> 		set processlist to name of every process
>> 		set the clipboard to "" & processlist -- removed "contents of"
>> 		display dialog "" & processlist
>> 	end tell
>
> You'll notice that because "set the clipboard" is a scripting addition command, it generates an error when directed to System Events and is then resent. It would be better to put it outside the tell block.
>
> And I know using ("" & processList) has its fans, but it seems to me that "as text" or "as string" aren't that much more typing, and are both clearer in intent and, in cases like this, more efficient.

Hello Shane,

I didn't really write the above: I just added "the" to Robert's original code, so as to show that such a tiny locution could, without any other change, yield the behavior he was looking for, in spite of what he wrote in his reply to Yvan.

Axel


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


References: 
 >set clipboard fails (From: Robert Poland <email@hidden>)
 >Re: set clipboard fails (From: "koenig.yvan" <email@hidden>)
 >Re: set clipboard fails (From: Robert Poland <email@hidden>)
 >Re: set clipboard fails (From: Axel Luttgens <email@hidden>)
 >Re: set clipboard fails (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: New File Here
  • Next by Date: Re: set clipboard fails
  • Previous by thread: Re: set clipboard fails
  • Next by thread: Re: set clipboard fails
  • Index(es):
    • Date
    • Thread