AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Loop input

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
purezelda



Joined: 04 Feb 2010
Posts: 3

PostPosted: Thu Feb 04, 2010 4:13 pm    Post subject: Loop input Reply with quote

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? Smile
Back to top
View user's profile Send private message
MasterFocus



Joined: 08 Apr 2009
Posts: 3035
Location: Rio de Janeiro - RJ - Brasil

PostPosted: Thu Feb 04, 2010 5:06 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
purezelda



Joined: 04 Feb 2010
Posts: 3

PostPosted: Fri Feb 05, 2010 6:18 pm    Post subject: Reply with quote

Hmm still cant get it to work with winactive :/
Back to top
View user's profile Send private message
MasterFocus



Joined: 08 Apr 2009
Posts: 3035
Location: Rio de Janeiro - RJ - Brasil

PostPosted: Sat Feb 06, 2010 4:17 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Ace Coder



Joined: 26 Oct 2009
Posts: 361

PostPosted: Sat Feb 06, 2010 5:53 am    Post subject: Reply with quote

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
View user's profile Send private message
purezelda



Joined: 04 Feb 2010
Posts: 3

PostPosted: Sat Feb 06, 2010 10:07 am    Post subject: Reply with quote

Thanks ace coder! Very Happy 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! Very Happy
Code:
^!s:: 
loop
{
Send 32021{Enter}
sleep,3000
Send,{Browser_Back}
Sleep,2500
Send {Click 1039, 591}
sleep 1200000
}
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group