Here is the final version of the "script", just in case someone else
looks for something similar.
What it does: I sends the selected text to a website (e.g. a online
translator).
If more than 1 word is selected, they get connected by a "+".
If the selected text is in more than 1 line, all words get connected
by a "+".
--- major part ripped off from Paul ;-)
ToDo:
Create a Key shortcut from the Key/Mouse tab
"Enter command": *Keys
"Enter keys to send": {ctrl}c
"Enter more commands"
wait.for(1000)
query=replacechars(clip.get,esc(?"\r\n",?"\"),"+")
query=replacechars(query," ", "+")
do(?"c:\program files\firefox15\firefox.exe",
?"http://dict.leo.org/?search="++query)
-------------
--- major part ripped off from Alan ;-)
Note:
Everything behind do(... must be in one line.
Yahoo adds a Return character [CR/LF] when it breaks a long line
in our messages.
That is called hard word wrap instead of soft word wrap.
You only want a space character after the comma,
so you have to delete the CR/LF which Yahoo adds.
To be sure, you can paste it into Notepad, then make it only
one line. Then copy it and paste it into the PP dialog.
When you paste that long line into "Enter more commands"
it will look like two lines, but really it is only one line
which is soft wrapped by PowerPro - so there is no Return
character after the comma.
-------------
Thanks to Paul and Alan!
F.D.
--- In [email protected], "Gardner, Paul G." <[EMAIL PROTECTED]>
wrote:
>
> Instead of this:
> s=replacechars(clip.get,"\n\r","+")
> try
> s=replacechars(clip.get,esc(?"\r\n",?"\"),"+")
>
>
> Paul
>
>
> > -----Original Message-----
> > From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of f.doerr
> > Sent: Friday, April 21, 2006 4:40 AM
> > To: [email protected]
> > Subject: [power-pro] Re: send selected text to an website (dict.leo)
>
>
> > Hi,
>
> > thanks for your help!
> > I took parts of both suggestions and it works now.
>
> > To enable the search of 2 strings (e.g. ,thank you,) I replaced
> > ++clip.get
> > with
> > ++replacechars(clip.get,, ,, ,+,)
>
> > This opens the following site: http://dict.leo.org/?search=thank+you
>
> > I also tried to replace the ,new lines, with a ,+, but it doesn't work
> > so far.
> > This is what i tried:
> > s=replacechars(clip.get,,\n\r,,,+,)
>
> > Any ideas how to replace the ,new lines,?
>
> > Thanks
> > F.D.
>
Attention: PowerPro's Web site has moved: http://www.ppro.org
SPONSORED LINKS
| Computer monitoring software | Power pro | Computer and internet software |
| Free computer monitoring software |
YAHOO! GROUPS LINKS
- Visit your group "power-pro" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
