Selecting text from MacPERL Via AppleScript
Selecting text from MacPERL Via AppleScript
- Subject: Selecting text from MacPERL Via AppleScript
- From: Tim Clark <email@hidden>
- Date: Mon, 26 Mar 2001 15:29:44 -0500
Hi-
I'm having an elegance issue with copying the output of a MacPERL Runtime
applet into anything.
After triggering the PERL script, in order to copy the contents, I always
have to use something like this:
-- begin code--
1 tell application "Foo-PERL-Applet"
2 activate
3 +event misccopy; characters 1 thru 500 of document 1
4 set theReply to Clipboard
5 Quit save ask
6 end tell
--end code--
At line 3, I always have to specify a numeric range of characters to copy.
This is awkward, since the output of these scripts is extremely variable in
length. - Sometimes it's 50 characters. Sometimes its over a thousand. (I'm
beating on tab-delimited database files with MacPERL).
I've tried the following to get around it:
1. +event misccopy; every character of document 1
2. +event misccopy; contents of document 1
3. Select every Character of document 1
+event misccopy; selection
And none of them works- #1just plain doesn't work- nothing gets copied. #2
crashes the system and I need to reboot. #3 selects the text but then kicks
me out to my error module.
Does anyone know of a way to select the entire contents of a document?
Thanks,
Tim