Source language: Translate to:

Sendkey to webbrowser object

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Sendkey to webbrowser object

Postby dpayer » Mon Apr 02, 2012 3:09 pm

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.
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Postby HPW » Mon Apr 02, 2012 10:49 pm

2nd: You may have a look at hpwClickMouse in hpwSendkeys.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby dpayer » Tue Apr 03, 2012 6:18 am

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.
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Postby Neosoft Support » Tue Apr 03, 2012 10:49 am

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.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby dpayer » Tue Apr 03, 2012 1:36 pm

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.
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 2 guests