 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
NaartjieDude
Joined: 15 Nov 2009 Posts: 3
|
Posted: Sun Nov 15, 2009 6:14 am Post subject: Getting AutoHotKey to type for you |
|
|
I've written quite abit of AutoHotKey scripts now, but I'm busy writing one to do my whole morning routine. It pretty much opens Firefox, moves mouse to position of password bar, etc. etc.
And its all working fine except for the fact that I can't get it to type out my password for me. Please help!
Also, is there a way for AHK to press key commands? How?
Cheers,
NaartjieDude |
|
| Back to top |
|
 |
rtcvb32
Joined: 17 Feb 2008 Posts: 125
|
|
| Back to top |
|
 |
NaartjieDude
Joined: 15 Nov 2009 Posts: 3
|
Posted: Sun Nov 15, 2009 6:58 am Post subject: |
|
|
OK, this is my code so far:
| Code: |
sleep, 15000
Run, firefox.exe [, C:\Program Files\Mozilla Firefox, Max]
Click 79, 82
Send mypasswordhere
|
Aaaand it doesn't type my password.
The "Click 79, 82" is so that The input password box is selected. Except sometimes the box moves, so also is there a way to select a window? I think I read something like that.... |
|
| Back to top |
|
 |
rtcvb32
Joined: 17 Feb 2008 Posts: 125
|
Posted: Sun Nov 15, 2009 7:18 am Post subject: |
|
|
first you aren't giving ANY time at all for firefox to open and load. Your password may be typed on another page or on the desktop for all we know.
It is possible to navigate textboxes links and other things using the tab, however you might be better off using COM controls to do that part.
http://www.autohotkey.com/forum/topic34972.html |
|
| Back to top |
|
 |
Guest
|
Posted: Sun Nov 15, 2009 7:45 am Post subject: |
|
|
OK, I've changed it abit.
| Code: | sleep, 200
Run, firefox.exe [, C:\Program Files\Mozilla Firefox, Max]
sleep, 3000
MouseMove, 313, 115 [,20]
Click
sleep, 5000
Click 681, 585
sleep, 5000
MsgBox, 4,, Would you like to continue to Gmail? (press Yes or No)
IfMsgBox Yes
send {LControl}+{T}
Click 151, 88
sleep, 5000
click 1236, 430
IfMsgBox No
Click 151, 88
sleep, 5000
click 1236, 430
]
Now it:
Loads up Firefox, waits 3 seconds. Presses a bookmark to Facebook, waits 5 seconds. Next it presses the login button, waits 5 seconds. A window pops up, asking if you want to continue to Gmail.
If you press yes, it goes to Gmail logs in, everything correct. If you press no, its supposed to create a new tab, then go into Gmail. But it doesn't. |
|
|
| Back to top |
|
 |
Guest
|
Posted: Sun Nov 15, 2009 7:47 am Post subject: |
|
|
K, I've changed it abit.
| Code: |
sleep, 200
Run, firefox.exe [, C:\Program Files\Mozilla Firefox, Max]
sleep, 3000
MouseMove, 313, 115 [,20]
Click
sleep, 5000
Click 681, 585
sleep, 5000
MsgBox, 4,, Would you like to continue to Gmail? (press Yes or No)
IfMsgBox Yes
send {LControl}+{T}
Click 151, 88
sleep, 5000
click 1236, 430
IfMsgBox No
Click 151, 88
sleep, 5000
click 1236, 430
|
Now it:
Loads up Firefox, waits 3 seconds. Presses a bookmark to Facebook, waits 5 seconds. Next it presses the login button, waits 5 seconds. A window pops up, asking if you want to continue to Gmail.
If you press yes, it goes to Gmail logs in, everything correct. If you press no, its supposed to create a new tab, then go |
|
| Back to top |
|
 |
rtcvb32
Joined: 17 Feb 2008 Posts: 125
|
Posted: Sun Nov 15, 2009 8:17 am Post subject: |
|
|
You should probably read up on WinWait. Also, depending on what browser, if it's maximized or not, or if you end up changing your resolution the positions will likely break later. Just a heads up.
http://www.autohotkey.com/docs/commands/WinWaitActive.htm |
|
| Back to top |
|
 |
Guest
|
Posted: Sun Nov 15, 2009 2:55 pm Post subject: |
|
|
I still cant get Firefox to open a new tab. Is the syntax for this line correct?
| Code: | | send {LControl}+{T} |
|
|
| Back to top |
|
 |
NaartjieDude
Joined: 15 Nov 2009 Posts: 3
|
Posted: Sun Nov 15, 2009 2:57 pm Post subject: |
|
|
for some reason I kept logging out each time I followed a new link, problem solved now.  |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|