Re: set clipboard fails
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