AutoHotkey Community

It is currently May 27th, 2012, 2:14 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Loop input
PostPosted: February 4th, 2010, 5:13 pm 
Offline

Joined: February 4th, 2010, 5:04 pm
Posts: 3
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? :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2010, 6:06 pm 
Offline

Joined: April 8th, 2009, 8:23 pm
Posts: 3036
Location: Rio de Janeiro - RJ - Brasil
Try IfWinActive and WinActivate related stuff.

_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"
Image
Antonio França
My stuff: Google Profile


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 5th, 2010, 7:18 pm 
Offline

Joined: February 4th, 2010, 5:04 pm
Posts: 3
Hmm still cant get it to work with winactive :/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 6th, 2010, 5:17 am 
Offline

Joined: April 8th, 2009, 8:23 pm
Posts: 3036
Location: Rio de Janeiro - RJ - Brasil
Also, IfWinExist.

_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"
Image
Antonio França
My stuff: Google Profile


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 6th, 2010, 6:53 am 
Offline

Joined: October 26th, 2009, 6:29 am
Posts: 362
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!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 6th, 2010, 11:07 am 
Offline

Joined: February 4th, 2010, 5:04 pm
Posts: 3
Thanks ace coder! :D 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! :D
Code:
^!s:: 
loop
{
Send 32021{Enter}
sleep,3000
Send,{Browser_Back}
Sleep,2500
Send {Click 1039, 591}
sleep 1200000
}


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Google Feedfetcher, nimda, poserpro, rbrtryn, sjc1000, Yahoo [Bot] and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group