| View previous topic :: View next topic |
| Author |
Message |
TLMATX
Joined: 16 Jun 2008 Posts: 2
|
Posted: Mon Jun 16, 2008 1:28 am Post subject: This is probably day 1 stuff but... |
|
|
So I've read the tutorial, searched the index using some key words and tried the few different ways I could think of to write this script with no success. All I want to do is to have the mouse go to the coordinates below and click the left mouse button once, wait 60 seconds, then repeat until I pause or stop the script. Every one I write either doesn't work at all or it just clicks the mouse over and over again without waiting the 60 seconds. My guess is that there is a single symbol or something like that that I keep overlooking that is preventing my success. The script below doesn't work but thats what I have so far. Any help would be appreciated!
Thanks,
Tom
Loop
Click 119, 53
Sleep, 60000
^!p::Pause |
|
| Back to top |
|
 |
Red Hat Dude Guest
|
Posted: Mon Jun 16, 2008 1:46 am Post subject: |
|
|
| Code: |
; x key starts clicking loop
x::
StopIt := 0
Loop
{
IfEqual, StopIt, 1, break
Click 119, 53
Sleep, 60000
}
return
; y key breaks it
y::
StopIt := 1
return |
Yes, I really should take the time to look up the pause script. But this is currently how I tackle these things. |
|
| Back to top |
|
 |
aaaaaaaaaaaaaaa Guest
|
Posted: Mon Jun 16, 2008 2:58 am Post subject: |
|
|
F1::
Loop
{
Click 119, 53
Sleep, 60000
}
return
F2::
suspend
return |
|
| Back to top |
|
 |
Superfraggle
Joined: 02 Nov 2004 Posts: 837 Location: London, UK
|
Posted: Mon Jun 16, 2008 3:18 am Post subject: |
|
|
| loop wrote: | | The loop command is usually followed by a block, which is a collection of statements that form the body of the loop. However, a loop with only a single command does not require a block (an if-else compound statement counts as a single command for this purpose). |
You are missing the braces for the block in your script ie | Code: | Loop
click ; as there are no braces only this line is looped
Sleep 60000 ; This line will not loop
Loop
{
Click
Sleep 60000
} ; Now we have enclosed both commands in the braces both commands will loop. |
_________________ Steve F AKA Superfraggle
http://r.yuwie.com/superfraggle |
|
| Back to top |
|
 |
TLMATX
Joined: 16 Jun 2008 Posts: 2
|
Posted: Mon Jun 16, 2008 3:20 am Post subject: |
|
|
Thanks guys!
Red Hat Dude, that script works great oh and FYI the last line in my original script allows you to pause it with ctrl+alt+P
aaaaaaaaaaaaa thanks to you too. I didn't try yours because the first one worked but thanks anyway! |
|
| Back to top |
|
 |
|