Re: set clipboard fails
Re: set clipboard fails
- Subject: Re: set clipboard fails
- From: Shane Stanley <email@hidden>
- Date: Fri, 26 Oct 2012 09:33:36 +1100
On 26/10/2012, at 9:15 AM, Axel Luttgens <email@hidden> 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.
> "the clipboard" vs "clipboard" always has been somewhat controversial, but I currently don't remember the details...
The Standard Additions command requires the "the".
--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>
_______________________________________________
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