SimpleText is not scriptable, but you might use other
applications such as AppleWorks.
-- paste from hypercard
put fld 1 into the clipboard
put "tell application" && quote & ¬
"AppleWorks" & quote && "to paste" ¬
into myScript
do myScript as AppleScript
-- copy to hypercard using
-- applescript
tell application "AppleWorks"
set myVar to the selection as text
end tell
set the clipboard to myVar
tell application "HyperCard"
do script "put \"" & myVar & "\" after ¬
the selection"
end tell
Now back to "why?". This script requires some text to be
selected in AppleWorks. You also will need to open a file in
that application. I don't know what you are trying to do, but
since you said you were using SimpleText it would be easier to
just open a file in HyperCard and pull the text out of it.
Best,
Mark
Sylvain Bouju wrote:
> Mark Schonewille <nospam.RemoveThis@nospam.com> wrote:
>
>
>>Maybe you could tell more about what you're trying
>>to achieve...
>
>
>
> Sorry in advance for my so poor english...;-)
>
> I wanted to know if there is an Hypercard script
> which can put directly text from a variable to the
> clipboard, and then, opening for example SimpleText,
> have this text in this other application just doing
> a "Paste" in its menu.
>
> And the reverse thing: having some text in the
> clipbboard from SimpleText, an Hypercard script
> which can paste it in a variable.
>
>
>>...and why?
>
>
> Why? ;-)
>
--
Economy-x-Talk Consultancy and Software Engineering
http://www.economy-x-talk.com
eHUG coordinator
http://www.ehug.info
Salery is the easiest way to set up your web store:
http://www.salery.biz/salery.html >> Stay informed about: HyperCard Clipboard in order to Copy/Paste with other app..