I just created a little VFP executable (.exe) that simply asks the user
for a string and does some processing. It returns another string that
gets placed in the clipboard, _CLIPTEXT.

Question 1:

The simple PRG that is part and parcel of the project (the entirety, so
far) defines a window and does a GET and READ. That Window's OK, but
it's shown in a VFP main screen. Is there a way to dispense with the
screen and just have my window show up, the one I defined like this:

DEFINE WINDOW browtbl FROM 10,10 TO 23,90 FLOAT
ACTIVATE WINDOW browtbl
@5,5 say 'Show newsgroups with what in the name?' GET lcstring
READ
DEACTIVATE WINDOW browtbl



Question 2 (probably more difficult):

What I'm really after is a way to keyboard this text where the mouse
cursor happens to be when I call this. I haven't even attempted this,
thinking it can't be done in FoxPro. Instead, I write to _CLIPTEXT. It
works, but I lose my former clipboard contents, occasionally a problem.
The mechanism I use here is to place my mouse cursor in some zone such
as one of the editing regions in a Google Groups search engine screen
(it's designed for that, actually). I then call my EXE with a macro
utility I use that's called with a keyboard shortcut. My macro utility
pops up a "popbox" from which I pick a button-icon representing an
action (in this case, my EXE). When my utility disappears (it does
automatically) my mouse cursor should be where it was before the utility
was called. I'd like to have my EXE actually write into where my mouse
was initially rather than my having to paste the clipboard contents? Is
that doable?

Thanks for ideas!!

Re: 2 VFP questions by Wolfgang

Wolfgang
Mon Feb 14 18:51:52 CST 2005

Hi Dan!
Why don't you use a form with textboxes on it and set the ShowWindow = 2 As
TopLevel
additionally you should make the form modal
WindowType=1 &&Modal

To get rid of the VFP screen write in the Config.fpw
screen=off

and in the start programm
_screen.visible=.f.
--
----------------------------------------------

Mit freundlichen Grüßen

Wolfgang Schmale



--------------------------------------------
"Dan_Musicant" <man@privacy.net> schrieb im Newsbeitrag
news:3q4211tc7f899c28u48ate7b8oa2poovl4@4ax.com...
>I just created a little VFP executable (.exe) that simply asks the user
> for a string and does some processing. It returns another string that
> gets placed in the clipboard, _CLIPTEXT.
>
> Question 1:
>
> The simple PRG that is part and parcel of the project (the entirety, so
> far) defines a window and does a GET and READ. That Window's OK, but
> it's shown in a VFP main screen. Is there a way to dispense with the
> screen and just have my window show up, the one I defined like this:
>
> DEFINE WINDOW browtbl FROM 10,10 TO 23,90 FLOAT
> ACTIVATE WINDOW browtbl
> @5,5 say 'Show newsgroups with what in the name?' GET lcstring
> READ
> DEACTIVATE WINDOW browtbl
>
>
>
> Question 2 (probably more difficult):
>
> What I'm really after is a way to keyboard this text where the mouse
> cursor happens to be when I call this. I haven't even attempted this,
> thinking it can't be done in FoxPro. Instead, I write to _CLIPTEXT. It
> works, but I lose my former clipboard contents, occasionally a problem.
> The mechanism I use here is to place my mouse cursor in some zone such
> as one of the editing regions in a Google Groups search engine screen
> (it's designed for that, actually). I then call my EXE with a macro
> utility I use that's called with a keyboard shortcut. My macro utility
> pops up a "popbox" from which I pick a button-icon representing an
> action (in this case, my EXE). When my utility disappears (it does
> automatically) my mouse cursor should be where it was before the utility
> was called. I'd like to have my EXE actually write into where my mouse
> was initially rather than my having to paste the clipboard contents? Is
> that doable?
>
> Thanks for ideas!!



Re: 2 VFP questions by Fred

Fred
Mon Feb 14 19:34:09 CST 2005

DEFINE WINDOW and add IN DESKTOP to get it to be outside VFP.

DEFINE WINDOW x SIZE 10,20 AT 5,5 IN DESKTOP SYSTEM CLOSE

You'd also need a _SCREEN.Visible = .F. and/or a SCREEN = OFF in the
CONFIG.FPW to hide the main VFP screen. But I do agree with Wolfgang, you
should use the newer style commands, not DEFINE WINDOW.

For your second question, there are windows API calls you could do like
SendKeys(), but I've not had a reason to use that. I think the Windows
scripting object also has a SendKeys() method.
--
Fred
Microsoft Visual FoxPro MVP


"Dan_Musicant" <man@privacy.net> wrote in message
news:3q4211tc7f899c28u48ate7b8oa2poovl4@4ax.com...
>I just created a little VFP executable (.exe) that simply asks the user
> for a string and does some processing. It returns another string that
> gets placed in the clipboard, _CLIPTEXT.
>
> Question 1:
>
> The simple PRG that is part and parcel of the project (the entirety, so
> far) defines a window and does a GET and READ. That Window's OK, but
> it's shown in a VFP main screen. Is there a way to dispense with the
> screen and just have my window show up, the one I defined like this:
>
> DEFINE WINDOW browtbl FROM 10,10 TO 23,90 FLOAT
> ACTIVATE WINDOW browtbl
> @5,5 say 'Show newsgroups with what in the name?' GET lcstring
> READ
> DEACTIVATE WINDOW browtbl
>
>
>
> Question 2 (probably more difficult):
>
> What I'm really after is a way to keyboard this text where the mouse
> cursor happens to be when I call this. I haven't even attempted this,
> thinking it can't be done in FoxPro. Instead, I write to _CLIPTEXT. It
> works, but I lose my former clipboard contents, occasionally a problem.
> The mechanism I use here is to place my mouse cursor in some zone such
> as one of the editing regions in a Google Groups search engine screen
> (it's designed for that, actually). I then call my EXE with a macro
> utility I use that's called with a keyboard shortcut. My macro utility
> pops up a "popbox" from which I pick a button-icon representing an
> action (in this case, my EXE). When my utility disappears (it does
> automatically) my mouse cursor should be where it was before the utility
> was called. I'd like to have my EXE actually write into where my mouse
> was initially rather than my having to paste the clipboard contents? Is
> that doable?
>
> Thanks for ideas!!