Re: Error with clipboard in OS 8.1
Re: Error with clipboard in OS 8.1
- Subject: Re: Error with clipboard in OS 8.1
- From: "Marc K. Myers" <email@hidden>
- Date: Fri, 25 Jan 2002 11:41:19 -0500
- Organization: [very little]
>
Date: Thu, 24 Jan 2002 14:13:19 -0800
>
From: Lars DeRuntz <email@hidden>
>
To: email@hidden
>
Subject: Error with clipboard in OS 8.1
>
>
tell application "Internet Explorer"
>
Activate
>
OpenURL "http://www.yahoo.com/"
>
set alphaSource to GetSource
>
end tell
>
>
tell application "Finder"
>
try
>
copy (alphaSource as text) to the clipboard
>
on error
>
set the clipboard to (alphaSource as text)
>
end try
>
end tell
>
>
I get an error, but can't make out why. Anyone have an answer, or guidance?
Despite appearances to the contrary, "the clipboard" is not an object.
It's actually a command that returns the contents of the clipboard.
Therefore you can't copy anything to it. "set the clipboard" is also a
command and should do what you want, but you have to use it in a tell
block to the frontmost application. Put an "activate" command before it
and it should do the trick. Both commands are part of Standard Additions.
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[1/25/02 11:40:01 AM]