| View previous topic :: View next topic |
| Author |
Message |
steveiwonder
Joined: 16 Nov 2004 Posts: 82
|
Posted: Mon Mar 07, 2005 3:35 pm Post subject: Sending keystrokes to a login box on a web page |
|
|
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.com/config/login?.src=www&.done=http://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? |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5049 Location: imaginationland
|
Posted: Mon Mar 07, 2005 4:02 pm Post subject: |
|
|
Since the ID box is auto-focused on load you can do something simple like sending the keys: | Code: | Run, http://login.yahoo.com/config/login?.src=www&.done=http://www.yahoo.com
Sleep, 750 ;adust this to your comp./net speed
Send, emailaddress@yahoo.com{tab}password{enter} |
_________________
RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2") |
|
| Back to top |
|
 |
steveiwonder
Joined: 16 Nov 2004 Posts: 82
|
Posted: Mon Mar 07, 2005 10:59 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5049 Location: imaginationland
|
Posted: Mon Mar 07, 2005 11:12 pm Post subject: |
|
|
Try: | Code: | 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, emailaddress@yahoo.com{tab}password{enter} |
_________________
RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2") |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Tue Mar 08, 2005 1:40 am Post subject: |
|
|
| steveiwonder wrote: | | 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. |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5049 Location: imaginationland
|
Posted: Tue Mar 08, 2005 2:29 am Post subject: |
|
|
| Chris wrote: | | steveiwonder wrote: | | 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?). _________________
RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2") |
|
| Back to top |
|
 |
jazzyjas
Joined: 13 Mar 2005 Posts: 1
|
Posted: Sun Mar 13, 2005 9:13 pm Post subject: Maybe we can force to send a password unvisibly..? |
|
|
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/admin.php?user=joe&pwd=password&method=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. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Mon Mar 14, 2005 2:19 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Payam
Joined: 07 Apr 2004 Posts: 58
|
Posted: Mon Mar 14, 2005 9:34 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Serenity
Joined: 08 Nov 2004 Posts: 892
|
Posted: Mon Mar 14, 2005 9:35 am Post subject: |
|
|
Jazzyjas, you might find this thread of interest. _________________ "Anything worth doing is worth doing slowly." - Mae West
 |
|
| Back to top |
|
 |
cornell2 Guest
|
Posted: Fri Mar 18, 2005 8:44 am Post subject: Finding specific input box |
|
|
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 |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Sat Mar 19, 2005 3:59 am Post subject: Re: Finding specific input box |
|
|
| cornell2 wrote: | | 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. |
|
| Back to top |
|
 |
cornell2
Joined: 18 Mar 2005 Posts: 166
|
Posted: Sat Mar 19, 2005 8:47 pm Post subject: Re: Finding specific input box |
|
|
| Chris wrote: | | cornell2 wrote: | | 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
: ) |
|
| Back to top |
|
 |
daonlyfreez
Joined: 16 Mar 2005 Posts: 745 Location: Berlin
|
Posted: Sun Mar 20, 2005 12:20 am Post subject: |
|
|
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 _________________ (sorry, homesite offline atm) |
|
| Back to top |
|
 |
Guest
|
Posted: Sun Mar 20, 2005 12:41 am Post subject: |
|
|
| daonlyfreez wrote: | 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, |
|
| Back to top |
|
 |
|