• 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: 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

  • Follow-Ups:
    • Re: set clipboard fails
      • From: Axel Luttgens <email@hidden>
    • Re: set clipboard fails
      • From: Jon Pugh <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>)

  • Prev by Date: Re: set clipboard fails
  • 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