Re: theSIMS -- Applescript copy paste from Explorer
Re: theSIMS -- Applescript copy paste from Explorer
- Subject: Re: theSIMS -- Applescript copy paste from Explorer
- From: Kai Edwards <email@hidden>
- Date: Sun, 17 Mar 2002 22:47:20 +0000
on Sun, 17 Mar 2002 17:22:38 +1100, Timothy Bates <email@hidden>
wrote:
>
This is made much easier if you select the text in explorer then use its
>
Jscript object model to grab it for you
>
>
--first select the text you want in IE's front window
>
>
tell application "Internet Explorer"
>
set whatIwanted to do script "document.getSelection()"
>
end tell
>
>
On 17/3/02 5:00 PM, "Kai Edwards" <email@hidden> wrote:
>
> on Fri, 15 Mar 2002 17:21:40 -0500, Xandra Lee <email@hidden>
>
>> Has anyone found an applescript only way to copy text from an Explorer
>
>> window.
>
> If you want a vanilla method for this, I've cobbled together a routine below
>
> which goes a reasonable way towards grabbing Explorer html code and
>
> converting it to plain(er) text.
Yeah - I can see that would make certainly make it easier from a scripting
point of view, Timothy. However, if text selection is to be carried out
manually, you could simply follow up with this instead:
----------------------------
set txt to get selected text
----------------------------
- which doesn't involve JavaScript and (OMM) appears to be slightly
(generally about 10%) faster than the 'do script' equivalent.
It's the apparent lack of a means of selecting text that is the stumbling
block here (as Applescript User Lewis has since also commented). This
strikes me as a rather glaring omission - although I'd be delighted if a
Java aficionado could prove us wrong on this. In the absence of such a
command, it seems the options are limited to manual operation, AS with some
OSAX keystroke emulation - or a somewhat extended vanilla process.
I suppose it could be argued that, while you're in OE to select text, you
could also copy it manually - which would pretty much obviate the need for a
script altogether. However, my suggestion was in response to the original
poster's query about an "AppleScript only" way to copy text.
Best wishes.
Kai
--
**********************************
Kai Edwards Creative Resources
1 Compton Avenue Brighton UK
Telephone +44 (0)1273 326810
**********************************
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.