Page 1 of 1
Autofill function
Posted: Sun Oct 21, 2012 2:30 am
by puddinhead
I'm trying to put together an app which will allow students to access several online services. Many of these services require that the student enter a the same username and password, which becomes a bit of a nuisance since they have to do it on each service they enter. I want to reduce all the signing on to a single login page that they can fill in once and then have the app autofill their information on each of the webpages they access.
Is there a way to do this? I can't find any commands in liveCode which let me access the fields on a webpage to autofill them.
Thanks for the help.
Re: Autofill function
Posted: Sun Oct 21, 2012 4:58 am
by dunbarx
This would be a fun project. There are a million ways to do it in LC.
I use this sort of thing, probably like most others, and it is usually helpful, though sometimes it seems to fill in oddly.
But if you can solidify the order and number of fields to be filled in, then the task is simple. The question is how do you want it to initiate? In a normal autofill, when you start your first name, the program will "get" who is typing, and know what comes next. Is this what you want?
If so, have each student's info stored in a custom property. If the initiating field is always the same (first name?), then have a keydown handler that takes the first few chars and checks against all those properties until it finds a match. The hander can then either fill in automatically, or more likely, ask for the privilege.
So make a field with a several first names in separate lines. Make another field with a keyDown handler that, after, say, three chars are typed into it, tells you the line number of the corresponding name in the other field. If you can do that, you can do the whole shebang.
Can you do this? Write back if you need help, but do try yourself first.
Craig Newman
Re: Autofill function
Posted: Sun Oct 21, 2012 4:33 pm
by Simon
Are these common online public services such as gmail?
Not sure it's possible, I've actually tried to do this before but to no avail, so I'd really be interested in hearing if theres a solution.
While Craig's stuff is good the critical part is sending the information to a web page.
Even my Chrome won't autofill all the protected pages I visit.
Simon
Re: Autofill function
Posted: Sun Oct 21, 2012 5:11 pm
by puddinhead
Thanks for the replies guys.
What I'm after is more like what Simon says can't be done. The students need to access their university e-mail accounts, their online LMS accounts (desire2learn) and several proprietary online databases, among other things; all of which are accessed by the same username and password combination. The trouble is, the student has to enter their information on nearly every screen they access. If they leave the app and then come back, they need to reenter their information all over again. Kind of a nuisance. Perhaps "autofill" isn't the correct term, but what I want is for them to be able to log onto the app one time (per day, say) with their user info and have the app automatically fill in the correct fields for them every time they hit a login page. I want a one time login that gives them access to everything throughout the day. What I'm finding is that LC can't directly access fields on web pages. Is this the case?
Thanks again.
Re: Autofill function
Posted: Sun Oct 21, 2012 5:46 pm
by Klaus
Hi puddinhead,
puddinhead wrote:What I'm finding is that LC can't directly access fields on web pages. Is this the case?
Yes, this is the case.
And welcome to the forum!
Best
Klaus
Re: Autofill function
Posted: Sun Oct 21, 2012 5:51 pm
by Simon
I think thats is the case. Even using revBrowser the browser takes focus away from the stack so using something like the "type" command does not work.
I do admit it seems that LC should be able to do this but thats my problem not LC's.
Maybe theres a VB or Applescript that can do it? I don't know if this works but
http://www.vbforums.com/showthread.php? ... d-password
Simon
Re: Autofill function
Posted: Tue Oct 23, 2012 4:40 pm
by user#606
Perhaps this might be a viable solution.
create a simple stack with a heading that matches the site. There are several sites.
Under each headding show fields that mimic the fields you need to fill out on the site web page. In these fields you embed the user data.
It needs to work this way.
Click on a field of the stack. By suitable coding to make it act like a button, or use a button, the field data is placed in the clipboard.
move the cursor to the appropriate field on the site web page and ControlV to paste it there.
If you think about it, it results in a very quick way to complete a form, probably better tan wasting time trying to invent the impossible.
Hope it helps.