On Sep 10, 10:37*am, mocha99 <moch...@xxxxxx> wrote:
> thanks a lot for the code. It doesnt exactly do what i need though...
> I'd need something that, while the cursor is blinking in any field in a
> web page (like in form) enables me to automatically fill in that field
> by pressing a button. The page where the curso is blinking is a web page
> that is not the same where the button is (it is a web page that I do not
> provide, i.e. a web page that I browse to on the internet).
> Can this be done?
> Thanks alot
> Tom Lavedas wrote:
> > On Sep 9, 7:15 pm, mocha99 <moch...@xxxxxx> wrote:
> >> I need to create a window or little dashboards with buttons, if I click
> >> on a button this should output a string of text (associated with that
> >> button) to wherever the cursor is blinking at the moment I click
> >> (without loosing the focus).
The same technique "might" be made to work in that situation, IF (and
it's a big if) some means of knowing which was the target window for
the insertion. I don't know of a way to get that information -
besides entering it into the application that contains the buttons.
That is, in script, there is really no way to know where the mouse
came from once the mouse leaves the target window and clicks on the
app with the buttons (at least not AFAIK). This means, the button app
doesn't know where to send its information.
I believe it might be possible to wrap the example HTA around a frame
that displays the target web page. In that case, it might be possible
(if IE8 is not loaded) to then send the information from the buttons
into the web page at the previously referenced cursor location.
Unfortunately, I am moments away from leaving on vacation, so I can't
go any further with this, sorry. Maybe someone else will be
interested in taking up the challenge.