|
Home > Archive > FoxPro Help and Support > December 2005 > residen in memory
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| Hi
I wrote a dictionary program with vp8 and it work very good. my dictionary
is English –Persian
But I want resident my program in memory and when I work with a web page or
a document in Microsoft word , and select a word in this page automatically
sent this selected word to my dictionary program and show the meaning of the
word .how I can do it
I made my program to executable program(EXE).
Thank you
| |
| Josh Assing 2005-12-17, 9:23 am |
| have it monitor the clipboard, when it seems a single word in the clipboard,
have it look it up.
On Fri, 16 Dec 2005 21:37:03 -0800, "bijan" <bijan@discussions.microsoft.com>
wrote:
>Hi
>I wrote a dictionary program with vp8 and it work very good. my dictionary
>is English –Persian
>But I want resident my program in memory and when I work with a web page or
>a document in Microsoft word , and select a word in this page automatically
>sent this selected word to my dictionary program and show the meaning of the
>word .how I can do it
>I made my program to executable program(EXE).
>Thank you
--- AntiSpam/harvest ---
Remove X's to send email to me.
| |
| bijan 2005-12-17, 11:23 am |
| hi
if you mean my program read word from clipboard i must say no could you how
i can read clipboard a word from clopboard and inset to a text box and after
that i want know when i select a word in the web page how it goes
automaticaly to clipboard and after that go to my program
thank yuo
"Josh Assing" wrote:
> have it monitor the clipboard, when it seems a single word in the clipboard,
> have it look it up.
>
> On Fri, 16 Dec 2005 21:37:03 -0800, "bijan" <bijan@discussions.microsoft.com>
> wrote:
>
>
>
> --- AntiSpam/harvest ---
> Remove X's to send email to me.
>
| |
| Josh Assing 2005-12-18, 7:23 am |
|
when you copy text; vfp "sees" this text as _cliptext
so something like:
lcCurrentWord = ""
do while .t.
if lcCurrentWord # _cliptext
do form DisplayWord with _cliptext
endif
enddo
and your form would then do the lookup of the word & display a top level form.
On Sat, 17 Dec 2005 08:42:03 -0800, "bijan" <bijan@discussions.microsoft.com>
wrote:
[color=darkred]
>hi
>if you mean my program read word from clipboard i must say no could you how
>i can read clipboard a word from clopboard and inset to a text box and after
>that i want know when i select a word in the web page how it goes
>automaticaly to clipboard and after that go to my program
>thank yuo
>
>"Josh Assing" wrote:
>
--- AntiSpam/harvest ---
Remove X's to send email to me.
| |
|
|
Sorry I could not use you help.
But I undrestan _cliptext and maybe I help me I go one step forward.
But rest of program I don’t understand why use do while .t.
And you think my program is runed and when I type in a text box in mr form
it serch the word. Now my problem is when I select a word how sent to
clipboard and after how to send to textbox in my form .how my form
understand a word went to clipboard.
I think there must be a program resident in memory . and when a word
selected this program copy word to clipboard and after that a form feel the
clipboard change and try to find word in dictionary
And I don’t know how to write these code
| |
| Olaf Doschke 2005-12-19, 7:24 am |
| Hi bijan,
> I think there must be a program resident in memory .
Yes, start an exe and you have a programm in memory.
>and when a word selected this program copy word to clipboard
It's much easier to look at what _cliptext contains in an
endless loop than to react to just the selection of a word.
I'd say that's no native Windows event you could handle,
every application may handle selections of text in a different
way.
Bye, Olaf.
| |
|
| hi olaf
could you write the code
i want copy a word automaticaly when it selected , to clipboard for example
in microsoft word or in a web page
thank you
| |
| Olaf Doschke 2005-12-19, 9:24 am |
| > could you write the code
> i want copy a word automaticaly when it selected , to clipboard for example
> in microsoft word or in a web page
> thank you
No, as I said there is no sinlge event to react to, so I can't write code to react just
to selection of text. It may not be impossible, but it's much harder to do then
watching for changes in _cliptext.
It's rather unusual to have an automatic translation of selected text, think
of someone wanting to select text *not* to translate it, but simply to copy
it to some other application. How annoying would it be, that some window
pops up with a translation? Monitoring the _clipboard would still be as
annoying if the user just wants to copy a text.
Write a translate.exe that will translate what's in the _cliptext if you start it.
No endless loop, no background process...
Create a link file linking to that translate.exe on the desktop and define a
hotkey within that link files properties, e.g. CTRL+ALT+T for translate.
Then:
a) select a text (in MS Word or a web Browser or any other application)
b) press CTRL+C => storing the text in the clipboard
c) press CTRL+ALT+T => calling translate.exe, which find's the text in _cliptext.
Bye, Olaf.
|
|
|
|
|