| View previous topic :: View next topic |
| Author |
Message |
purezelda
Joined: 04 Feb 2010 Posts: 3
|
Posted: Thu Feb 04, 2010 4:13 pm Post subject: Loop input |
|
|
Hey I'm new to AutoHotkey and i was wondering if anyone could help me write out this macro. What i want it todo is Input some text press enter then go back on the browser click the input box and then repeat that process every 20mins.
Heres what i got so far
^!s::
loop
{
Send 4731{Enter}
Run http://www.madeupsite.com
Send {Click 1023, 419}
sleep 10000
}
Now it does the input fine of 4731 and presses enter but then it doesn't go back i tryed the "Run http://www.madeupsite.com" to go back to the orginal url but that just opens a new tab with the site. Then the click doesn't click the input box which causes the send to not be input again. I know the sleep time is wrong for 20mins but that was just to test it.
Can anyone help me please?  |
|
| Back to top |
|
 |
MasterFocus
Joined: 08 Apr 2009 Posts: 3035 Location: Rio de Janeiro - RJ - Brasil
|
Posted: Thu Feb 04, 2010 5:06 pm Post subject: |
|
|
Try IfWinActive and WinActivate related stuff. _________________ "Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried."
Antonio França
My stuff: Google Profile |
|
| Back to top |
|
 |
purezelda
Joined: 04 Feb 2010 Posts: 3
|
Posted: Fri Feb 05, 2010 6:18 pm Post subject: |
|
|
| Hmm still cant get it to work with winactive :/ |
|
| Back to top |
|
 |
MasterFocus
Joined: 08 Apr 2009 Posts: 3035 Location: Rio de Janeiro - RJ - Brasil
|
Posted: Sat Feb 06, 2010 4:17 am Post subject: |
|
|
Also, IfWinExist. _________________ "Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried."
Antonio França
My stuff: Google Profile |
|
| Back to top |
|
 |
Ace Coder
Joined: 26 Oct 2009 Posts: 361
|
Posted: Sat Feb 06, 2010 5:53 am Post subject: |
|
|
| Code: | ^!s:: ;By the way, not the best choice of hotkey
loop
{
Send 4731{Enter}
;Run http://www.madeupsite.com
Send,{Browser_Back}
Sleep,2500
Send {Click 1023, 419}
sleep 10000
} |
_________________ Check out the new AHK forum competition! |
|
| Back to top |
|
 |
purezelda
Joined: 04 Feb 2010 Posts: 3
|
Posted: Sat Feb 06, 2010 10:07 am Post subject: |
|
|
Thanks ace coder! I'm new to this so im not very good but i wasn't too far off thanks for the help had to make a tiny adjust me but it works!
| Code: | ^!s::
loop
{
Send 32021{Enter}
sleep,3000
Send,{Browser_Back}
Sleep,2500
Send {Click 1039, 591}
sleep 1200000
}
|
|
|
| Back to top |
|
 |
|