Page 1 of 1

Sendkey to webbrowser object

PostPosted: Mon Apr 02, 2012 3:09 pm
by dpayer
I have an app with an HTML editor loaded into the webbrowser object.

I would like to paste something from the clipboard into that page.

It works to do a SHIFT / INSERT from they board so I'd like to emulate that with sendkey. Sendkey requires the APPID that it will send the keystroke to.

If I leave APPID blank the keystrokes do not reach the webbrowser object. This is true even if I give the object the focus.

How do I determine what is the APPID of that page loaded into the webbrowser object?

If we simply want sendkey to enter the keystrokes into the NB app where we have placed the focus, how do we do that?

2nd point . . . is it possible to send a right click to the app via command? That is not a sendkey option.

David P.

PostPosted: Mon Apr 02, 2012 10:49 pm
by HPW
2nd: You may have a look at hpwClickMouse in hpwSendkeys.

PostPosted: Tue Apr 03, 2012 6:18 am
by dpayer
HPW wrote:2nd: You may have a look at hpwClickMouse in hpwSendkeys.


Thank you Hans Peter, I will.

I always look for NB native solutions first but I know I can't expect NB to be able to do everything natively.

Still, I have found some very creative people here with answers that surpass expectations!

David P.

PostPosted: Tue Apr 03, 2012 10:49 am
by Neosoft Support
The browser doesn't have an AppID because it's not an external program.

To paste something into the browser, you could try using JavaScript with BrowserExecScript or possibly BrowserSetElement.

PostPosted: Tue Apr 03, 2012 1:36 pm
by dpayer
Neosoft Support wrote:The browser doesn't have an AppID because it's not an external program.

To paste something into the browser, you could try using JavaScript with BrowserExecScript or possibly BrowserSetElement.


The problem is that the page already IS a javascript (TinyMCE) and I don't want to integrate on the JS level, if possible.

In any case, I found a work around (I didn't remember NB has a mouseclick command!) and was able to use that plus the sendkeys.

I put that method into the project and wrapped up a concept with a post here: http://www.neosoftware.com/forum/viewtopic.php?t=19293

David P.