Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Sending keystrokes to a login box on a web page


  • Please log in to reply
18 replies to this topic
steveiwonder
  • Members
  • 83 posts
  • Last active: Sep 02 2008 05:43 PM
  • Joined: 16 Nov 2004
Would anyone be able to help me here,?
for example,
Someone wants to write a script to log you into ummm... Yahoo or something
can you tell AHK to send keystrokes to a certain edit box on there website?
Like
http://login.yahoo.c...//www.yahoo.com
You wanna send your Username to the Yahoo! ID box,
how can i send my username to that and that only

any idea's?

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
Since the ID box is auto-focused on load you can do something simple like sending the keys:
Run, http://login.yahoo.com/config/login?.src=www&.done=http://www.yahoo.com 

Sleep, 750 ;adust this to your comp./net speed

Send, [email protected]{tab}password{enter}

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


steveiwonder
  • Members
  • 83 posts
  • Last active: Sep 02 2008 05:43 PM
  • Joined: 16 Nov 2004
Thats kinda what i needed but w/o using sleep, wondered if u could tell it to send to that edit box spacifically...? or is that not possible

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
Try:
Run, http://login.yahoo.com/config/login?.src=www&.done=http://www.yahoo.com 

WinWait, Yahoo! Login - Microsoft Internet Explorer

WinActivate, Yahoo! Login - Microsoft Internet Explorer

WinWaitActive, Yahoo! Login - Microsoft Internet Explorer

Send, [email protected]{tab}password{enter}

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

send to that edit box spacifically...? or is that not possible

If you haven't already, try ControlSetText and if that doesn't work, ControlSend.

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012

send to that edit box spacifically...? or is that not possible

If you haven't already, try ControlSetText and if that doesn't work, ControlSend.

Chirs, this wont work (I've tried) because the IE window has it's own ClassNN; component's such as edit, static, etc don't exist (or am I trying it wrongly?).

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


jazzyjas
  • Members
  • 1 posts
  • Last active: Mar 23 2005 08:14 PM
  • Joined: 13 Mar 2005
The thing is - I have tried to logon to other websites -
and I just can't get the focus on the login field!

I'd rather pass the whole uri to IE and tell autohotkey
to use the method post to send the data and
not the method get!

To be more precisely, let's assume I have a webside called
xyz.com. I am user:joe and have pwd:password.

I'd like to write sth. like
run, http://www.xyz.com/a... ... ethod=post
into autohotkey to avoid letting anybody see
my password!

The risk to loose the password by letting autohotkey type it
- is in my opinion too high! I tried so often and there are so
many possibilites of disturbance that my password was
written everywhere but not in the textbox.

I would prefer to avoid it somehow!

What do you think? Is there a possibility
to automate internet password logins
without ever showing up the password?

Greetings

JAZZYJAS.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
It seems the key is to get the focus set to the right field/control so that the password will be masked when typed. In some browsers, you can improve the reliability of this by using the Find function to select a word that occurs right before the target field, and then Send {Tab} to set the focus.

There are also some posts on the forum about how to use a one-line javascript command, pasted into the address bar, to automate certain kinds of form actions.

Jimmy2Times
  • Members
  • 65 posts
  • Last active: Jul 15 2014 07:56 PM
  • Joined: 07 Apr 2004
This was a very important topic to me as well. I always wondered how some programs such as Roboform (www.roboform.com) which fills forms and passwords worked (guys any thoughts?).

Anyways, If you really want to do things "behind the scenes" and use a method spiders and other programs use:

http://curl.haxx.se/

curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. Curl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a busload of other useful tricks.

I've spend a lot of time trying to get it to work for my needs and even had to hire a consultant - anyways, it works well without too much hassle UNLESS you need cookies involved - thats where it starts to get hard.

----

However, if you don't need such a "professional" method, I use the Ctrl F (then type a search text preceeding the form you want to have focus) then hit {TAB} as Chris mentioned.



Good luck.

Serenity
  • Members
  • 1271 posts
  • Last active:
  • Joined: 07 Nov 2004
Jazzyjas, you might find this thread of interest.
"Anything worth doing is worth doing slowly." - Mae West
Posted Image

cornell2
  • Guests
  • Last active:
  • Joined: --
This is a big issue for me too .. I just cannot believe that Autokey doesn't too this (or at least it is not obvious).

For my use, I just want Autokey to bring me to a specific web page, and then go to the 3rd text-input field and paste something.

I am having a helluva time making it do this .. and cannot believe that it is this complex a task (where I either have to kludge it by doing a ctrl-F and search, or javascript).

Can anyone here set me straight?

Thanks

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

For my use, I just want Autokey to bring me to a specific web page, and then go to the 3rd text-input field and paste something.

I don't know of a single method that works identically on all major browsers.

But perhaps such features will be added someday, especially if an expert comes along to explain a workable approach.

cornell2
  • Members
  • 174 posts
  • Last active: Feb 04 2012 11:09 PM
  • Joined: 18 Mar 2005

For my use, I just want Autokey to bring me to a specific web page, and then go to the 3rd text-input field and paste something.

I don't know of a single method that works identically on all major browsers.

Well, I'd just be happy if it worked on *my* browser! IE6

: )

daonlyfreez
  • Members
  • 995 posts
  • Last active: Jan 23 2013 08:16 AM
  • Joined: 16 Mar 2005
Maybe you could try to parse the page first, get the existing elements on page thru JavaScript and then fill in the form fields as needed? This could all be done thru JavaScript...

You can access the elements by this kind of syntax:

document.forms[0].elements[0].value

More on elements on a web page
Posted Image mirror 1mirror 2mirror 3ahk4.me • PM or Posted Image

  • Guests
  • Last active:
  • Joined: --

Maybe you could try to parse the page first, get the existing elements on page thru JavaScript and then fill in the form fields as needed? This could all be done thru JavaScript...

You can access the elements by this kind of syntax:

document.forms[0].elements[0].value

More on elements on a web page


Actually I got it done ... but to all that suggested Javascript etc .. I am sure there are a lot of other ways to accomplish this seemngly simple task (including just paying someone to type the keys everytime they see the right fields to enter). Since I am using this autohotkey utility, and participating in the autohotkey community - the desire was to investigate and autohotkey solution (for a pretty straightforward and common issue).

Just like the other folks who were asking for a solution above - if I wanted to learn Javascript (or another tool) then I would not be using autohotkey.

I don't mean for this to sound negative or ungrateful (I am neither). But it is a little like getting a new samsung phone and spending time programming the autodial buttons only to find that they only accept 6 digits (when you normally need 7-10). And when you call samsung to get help, all the support folks merely suggest you go buy a nokia phone.

: )

Thanks all,