Re: how to get the text selection in an applescript
Re: how to get the text selection in an applescript
- Subject: Re: how to get the text selection in an applescript
- From: Gary Lists <email@hidden>
- Date: Sun, 18 Jan 2004 23:47:06 -0500
leo wrote [01-18-04 10:47 PM]:
>
hi there
>
>
i want to write a little script which retrieves an url incorporating the
>
selected text. (dict.leo.org offers great english-german translation on url
>
basis.) so, how do i find out the selected text in the current application?
>
>
and furthermore: is there a way to modify the text in a selection? i'd like
>
to give back a "result" (the translated word) in the same selection.
>
>
thanks, leo
Hi Leo.
You describe great uses for AppleScript.
Unfortunately, you don't say which applications you are using.
Getting the current "selection" is a common task, but will vary depending on
the "thing" that is selected. And the application's involved.
Further, once you have some text (as a URL, presumably) captured somewhere,
you don't say which browser you wish to send the URL.
That last one also affects what you do with the page that is then displayed
(a translation, you said.) Did you want to just show the web page? Capture
the resulting page as text? Do something with that text?
There's just not enough information in your question to give you anything
more specific without making wild guesses.
Please re-ask your question and provide specifics.
--
Gary
(P.S. Lots of scriptable applications come with example scripts. Did you
check the folder location of your browser? Your word processor? Whatever
you're using?)
(P.P.S. Did you go to MacScripter.net and look at the ScriptBuilders
section? Or the Code Exchange section? There are lots of useful tid-bits
and starters around.)
(P.P.P.S Did you Google?)
_______________________________________________
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.