Fill web input field in revbrowser without physical keyboard

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
gizmothecat
Posts: 3
Joined: Mon Oct 29, 2012 4:56 pm

Fill web input field in revbrowser without physical keyboard

Post by gizmothecat » Mon Oct 29, 2012 5:04 pm

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

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Fill web input field in revbrowser without physical keyb

Post by Mark » Tue Oct 30, 2012 11:57 am

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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

gizmothecat
Posts: 3
Joined: Mon Oct 29, 2012 4:56 pm

Re: Fill web input field in revbrowser without physical keyb

Post by gizmothecat » Tue Oct 30, 2012 3:38 pm

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

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Fill web input field in revbrowser without physical keyb

Post by Mark » Tue Oct 30, 2012 3:42 pm

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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Fill web input field in revbrowser without physical keyb

Post by sturgis » Tue Oct 30, 2012 3:52 pm

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.

gizmothecat
Posts: 3
Joined: Mon Oct 29, 2012 4:56 pm

Re: Fill web input field in revbrowser without physical keyb

Post by gizmothecat » Tue Oct 30, 2012 4:50 pm

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.

Post Reply