Page 1 of 1

Fill web input field in revbrowser without physical keyboard

Posted: Mon Oct 29, 2012 5:04 pm
by gizmothecat
Hi,

I'm new to LiveCode and I have almost figured to create all I want except a point.

The application is running on desktop mac, some kind of kiosk, without any mouse or keyboard. Everything is done via a touch screen.

On regular cards I can fill fields with a virtual keyboard I have created, pretty normal thing.

But on one card I have a revBrowser which shows a webpage and we would like to have the person to be able to do some research on that web page using a search field in the webpae. But the problem is since it's a web field in a revbrowser object how can fill that field with some buttons on the card as letters? If anyone has an idea / solution , it would be welcome.

Thanks

Alex

Re: Fill web input field in revbrowser without physical keyb

Posted: Tue Oct 30, 2012 11:57 am
by Mark
Hi Alex,

Use this command line utility. I tested it and it works perfectly on Mac OS X 10.6. I expect it to work on 10.7 and 10.8. You don't need it on 10.4 and 10.5 because you can use:

Code: Select all

launch "/System/Library/Components/KeyboardViewer.component/Contents/SharedSupport/KeyboardViewerServer.app"
It takes a second for the app to start up.

Kind regards,

Mark

Re: Fill web input field in revbrowser without physical keyb

Posted: Tue Oct 30, 2012 3:38 pm
by gizmothecat
Hi,

thank you for the idea. I saw that possibility, but if I remember well it gives you a full virtual mac keyboard. The keyboard I need is a limited one.

I came with an other idea, which I haven't tried yet. Since we can call functions in the webview from the application. I can code a javascript function in the internet page used, which get which button was pressed on my virtual keyboard in the app and fill the web form field that way.

Theoretically that should do the trick.

Thank you for your input.

Alex

Re: Fill web input field in revbrowser without physical keyb

Posted: Tue Oct 30, 2012 3:42 pm
by Mark
Hi Alex,

I doubt that keypresses are passed on to the web view by LiveCode, but it would be interesting if your solution actually appeared to work.

Kind regards,

Mark

Re: Fill web input field in revbrowser without physical keyb

Posted: Tue Oct 30, 2012 3:52 pm
by sturgis
Yep, should work fine. Not sure if it would be better to collect all input and call the function once, or update with each key but should be doable either way.
gizmothecat wrote:Hi,
Since we can call functions in the webview from the application.....
EDIT:
another way might be possible if the search uses get rather than post..

Collect the input, build an URL string, and then have revbrowser navigate to that url thereby passing the data on. Not as nifty as the other method though.

Re: Fill web input field in revbrowser without physical keyb

Posted: Tue Oct 30, 2012 4:50 pm
by gizmothecat
Hi,

yes that's a good idea Sturgis. I haven't thought about that one. Collect the search term in a livecode field and use it to create an url with the search info as get parameter. That should do it and no need to write some javascript function in the webpage.

Thank you everyone for your input.