 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
sinder151 Guest
|
Posted: Fri May 08, 2009 11:49 pm Post subject: autohotkey Loop answear Fast please :) |
|
|
ive just learned to make a script / bot or what we should call it. but how do i make it to restart the bot / script? like make a Loop
i want the script to not stop after it have done its job. i want it to start over and over again and never stop.
How do i make it to do that? |
|
| Back to top |
|
 |
DataLife
Joined: 27 Apr 2008 Posts: 369
|
|
| Back to top |
|
 |
sinder151 Guest
|
Posted: Sat May 09, 2009 12:01 am Post subject: ty |
|
|
| DataLife wrote: |
You should use a hotkey to exit your script when you need to. Put this after the loop closing bracket
| Code: |
^x:: ;this would exit the script when Ctrl x is pressed.
exitapp
|
|
Should i just open the script in notepad and write Loop under this:
MouseClick, left, 592, 453
Sleep, 100
MouseClick, left, 162, 470
Sleep, 100
MouseClick, left, 353, 536
Sleep, 100
MouseClick, left, 1015, 427
Sleep, 100
MouseClick, left, 495, 670
Sleep, 100
MouseClick, left, 137, 471
Sleep, 100
MouseClick, left, 358, 449
Sleep, 100
MouseClick, left, 147, 477
Sleep, 100
MouseClick, left, 340, 468
Sleep, 100
MouseClick, left, 1016, 378
Sleep, 100
MouseClick, left, 506, 649
Sleep, 100
MouseClick, left, 122, 472
Sleep, 100 |
|
| Back to top |
|
 |
sinder151 Guest
|
|
| Back to top |
|
 |
sosaited
Joined: 24 Feb 2005 Posts: 278
|
Posted: Sat May 09, 2009 12:22 am Post subject: |
|
|
If your whole code is what you wrote, then:
After running the script, press Ctrl + s to start the loop, and Ctrl + x to end it.
| Code: | ^s::
GoSub, start
return
^x::
ExitApp
return
start:
Loop
{
MouseClick, left, 592, 453
Sleep, 100
MouseClick, left, 162, 470
Sleep, 100
MouseClick, left, 353, 536
Sleep, 100
MouseClick, left, 1015, 427
Sleep, 100
MouseClick, left, 495, 670
Sleep, 100
MouseClick, left, 137, 471
Sleep, 100
MouseClick, left, 358, 449
Sleep, 100
MouseClick, left, 147, 477
Sleep, 100
MouseClick, left, 340, 468
Sleep, 100
MouseClick, left, 1016, 378
Sleep, 100
MouseClick, left, 506, 649
Sleep, 100
MouseClick, left, 122, 472
Sleep, 100
}
|
_________________ My small "thanks" to AHK in shape of these dedicated 3d images
 |
|
| Back to top |
|
 |
sinder151 Guest
|
Posted: Sat May 09, 2009 12:27 am Post subject: cmon |
|
|
| Come on please. Help me ive tryed everything u said now it just saying Error and something about IF and something about #LINE 4 {Loop Error i dont understand. |
|
| Back to top |
|
 |
sosaited
Joined: 24 Feb 2005 Posts: 278
|
Posted: Sat May 09, 2009 12:31 am Post subject: |
|
|
Did you copy exactly what I wrote in a new file and ran it? . I don't see why you will get an error.
Post the whole script and exact error if you still get it _________________ My small "thanks" to AHK in shape of these dedicated 3d images
 |
|
| Back to top |
|
 |
sinder151 Guest
|
Posted: Sat May 09, 2009 12:32 am Post subject: :) |
|
|
| sosaited wrote: | If your whole code is what you wrote, then:
After running the script, press Ctrl + s to start the loop, and Ctrl + x to end it.
| Code: | ^s::
GoSub, start
return
^x::
ExitApp
return
start:
Loop
{
MouseClick, left, 592, 453
Sleep, 100
MouseClick, left, 162, 470
Sleep, 100
MouseClick, left, 353, 536
Sleep, 100
MouseClick, left, 1015, 427
Sleep, 100
MouseClick, left, 495, 670
Sleep, 100
MouseClick, left, 137, 471
Sleep, 100
MouseClick, left, 358, 449
Sleep, 100
MouseClick, left, 147, 477
Sleep, 100
MouseClick, left, 340, 468
Sleep, 100
MouseClick, left, 1016, 378
Sleep, 100
MouseClick, left, 506, 649
Sleep, 100
MouseClick, left, 122, 472
Sleep, 100
}
|
|
Thanks. but the bot goes To fast i didnt Record it so fast. i recored the bot and used like 15 min. how to get it to normal speed? |
|
| Back to top |
|
 |
sosaited
Joined: 24 Feb 2005 Posts: 278
|
Posted: Sat May 09, 2009 12:35 am Post subject: |
|
|
You want 15 minutes gap between Loops or Mouseclicks?
If you want the loop to start after every 15 minutes then:
| Code: | ^s::
GoSub, start
return
^x::
ExitApp
return
start:
Loop
{
MouseClick, left, 592, 453
Sleep, 100
MouseClick, left, 162, 470
Sleep, 100
MouseClick, left, 353, 536
Sleep, 100
MouseClick, left, 1015, 427
Sleep, 100
MouseClick, left, 495, 670
Sleep, 100
MouseClick, left, 137, 471
Sleep, 100
MouseClick, left, 358, 449
Sleep, 100
MouseClick, left, 147, 477
Sleep, 100
MouseClick, left, 340, 468
Sleep, 100
MouseClick, left, 1016, 378
Sleep, 100
MouseClick, left, 506, 649
Sleep, 100
MouseClick, left, 122, 472
Sleep, 900000
} |
_________________ My small "thanks" to AHK in shape of these dedicated 3d images
 |
|
| Back to top |
|
 |
sinder151 Guest
|
Posted: Sat May 09, 2009 12:46 am Post subject: |
|
|
| no i dont want to wait 15 min after each loop i want it to go slower the bot didnt even do what it should do becouse it was way to fast. is it possible to make the bot to do its work slowly? |
|
| Back to top |
|
 |
sosaited
Joined: 24 Feb 2005 Posts: 278
|
Posted: Sat May 09, 2009 12:49 am Post subject: |
|
|
Increase the Sleep duration from 100 to 500 or 1000 (1 second) between each MouseClick. _________________ My small "thanks" to AHK in shape of these dedicated 3d images
 |
|
| Back to top |
|
 |
sinder151 Guest
|
Posted: Sat May 09, 2009 12:55 am Post subject: |
|
|
| Thanks that worked. But why does not the script scroll down? ive made it to scroll the site a little bit down. |
|
| Back to top |
|
 |
sosaited
Joined: 24 Feb 2005 Posts: 278
|
Posted: Sat May 09, 2009 1:00 am Post subject: |
|
|
I didn't understand what you are trying to ask. Scroll down what?
If you mean the code in the posts, then click anywhere in the code area, or click on Expand button. _________________ My small "thanks" to AHK in shape of these dedicated 3d images
 |
|
| Back to top |
|
 |
sinder151 Guest
|
Posted: Sat May 09, 2009 1:55 am Post subject: |
|
|
nah i made everything to work like i wanted to.
Thanks for all the help
Im very happy now im searched for a bot in alot of days. but now i dont need one since i got one Ty |
|
| Back to top |
|
 |
DataLife
Joined: 27 Apr 2008 Posts: 369
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|