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 

Need help with very simple macro...

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



Joined: 30 Jan 2010
Posts: 4

PostPosted: Sat Jan 30, 2010 3:45 am    Post subject: Need help with very simple macro... Reply with quote

i want to make a script that will do this:
click at 500,355.....then click on 500,425.....with about 1/2 of a second between each click.....then loop until i tell it to stop. how do i do this?

[Title edited. Please write descriptive titles for your topics. ~jaco0646]
Back to top
View user's profile Send private message
geekdude



Joined: 23 Nov 2009
Posts: 64

PostPosted: Sat Jan 30, 2010 4:07 am    Post subject: Reply with quote

you have your script rigt there, you just need to put it together
loop
click
wait/sleep
_________________
  /\ /\ This is Kitty
(>';'<) Cut, copy, and paste kitty onto your sig.
((")(")) Help Kitty gain World Domination.

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.
Back to top
View user's profile Send private message
i am w8in



Joined: 30 Jan 2010
Posts: 4

PostPosted: Sat Jan 30, 2010 3:12 pm    Post subject: Reply with quote

so the script would look like this?:

Code:
loop
{
if F12
break

click 500, 355
sleep 500

click 500, 425
sleep 500
}


would that be correct?
Back to top
View user's profile Send private message
kdoske



Joined: 17 Dec 2008
Posts: 80

PostPosted: Sat Jan 30, 2010 4:53 pm    Post subject: Reply with quote

close

search hotkeys in the help file. The loop would not be needed unless you wanted the script to run indefinitely after the hotkey was pushed.
Back to top
View user's profile Send private message
i am w8in



Joined: 30 Jan 2010
Posts: 4

PostPosted: Sat Jan 30, 2010 5:43 pm    Post subject: Reply with quote

i tried running the script that i posted above, but it started and i couldn't get it to stop unless i exited AHK. how do I make it stop after its started? I also want a continue button so I can make it go again after i stop it.
Back to top
View user's profile Send private message
tomoe_uehara



Joined: 05 Sep 2009
Posts: 1591
Location: Somewhere near you

PostPosted: Sat Jan 30, 2010 6:37 pm    Post subject: Reply with quote

You could assign the 'Pause' command to a key.
_________________

The quick onyx goblin jumps over the lazy dwarf
Back to top
View user's profile Send private message
None



Joined: 28 Nov 2009
Posts: 3086

PostPosted: Sat Jan 30, 2010 6:55 pm    Post subject: Reply with quote

Code:
q:: ;q to start
loop
{
if GetKeystate("F12") ; check state of F12
break

click 500, 355
sleep 500

click 500, 425
sleep 500
}
Return

Esc::ExitApp ;Emergency Exit

I already had a Macro assigned to F12 so it could not see the Key Press to stop. I Had to ReBoot to get it to stop Embarassed .
Back to top
View user's profile Send private message
tomoe_uehara



Joined: 05 Sep 2009
Posts: 1591
Location: Somewhere near you

PostPosted: Sat Jan 30, 2010 7:05 pm    Post subject: Reply with quote

But if you 'break' the loop, then you couldn't resume it. You have to start again from the beginning.
_________________

The quick onyx goblin jumps over the lazy dwarf
Back to top
View user's profile Send private message
i am w8in



Joined: 30 Jan 2010
Posts: 4

PostPosted: Sat Jan 30, 2010 7:28 pm    Post subject: Reply with quote

None wrote:
Code:
q:: ;q to start
loop
{
if GetKeystate("F12") ; check state of F12
break

click 500, 355
sleep 500

click 500, 425
sleep 500
}
Return

Esc::ExitApp ;Emergency Exit

I already had a Macro assigned to F12 so it could not see the Key Press to stop. I Had to ReBoot to get it to stop Embarassed .


this program you made works perfectly for what im trying to do, thank you very much Smile
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