Jump to content
Sign in to follow this  
Guest Nemo

Looping It?

Recommended Posts

Guest Nemo

Hi all, i need some help.

(bear in mind that i'm a n00b at autoit :lol: )

i'm wondering how i should do to make a skript that clicks at x149 and y70.

Then moves, kinda slow (about 5 secs), to x187 and y171 and clicks there and then do it over and over again untill i stop it (dunno how either :) )

i've done this so far

; Auto clicking...

MsgBox(0, "Muhahahaha", "Hope it works...")

MouseClick ("left", 149, 70, 1, 40)

MouseClick ("left", 187, 171, 1, 100)

not much i know :D but it works once and then it closes...

i'm grateful for replys :huh2:

Share this post


Link to post
Share on other sites
Triton

try something like this

While 1

$windows = WinWaitActive ( "title", ["text"], [timeout] )

If $windows=0 Then

ExitLoop

Else

MouseClick ("left", 149, 70, 1, 40)

MouseClick ("left", 187, 171, 1, 100)

EndIf

Wend


Triton

Share this post


Link to post
Share on other sites
Guest Nemo

Thx for the reply :)

i actually found out a way to do it while i was waiting for a reply :huh2:

; Auto clicking...

MsgBox(0, "Muhahahaha", "Hope it works...")

While 1 = 1

HotKeySet("{Esc}", "MyExit")

Sleep(1000)

MouseClick ("left", 149, 70, 1, 3)

Sleep(5500)

MouseClick ("left", 187, 171, 1, 3)

Wend

Func MyExit()

    Exit

EndFunc

but if you have some sugestions plz tell them :lol:

oh, and i tryed what u said... and it didn't work :) it said something "Unknown function name". i'm a n00b remember :(

well thx again. :D

Share this post


Link to post
Share on other sites
Guest Nemo

i found out another problem...

how do i do to make the script to click on a message box that comes up sometimes?

Share this post


Link to post
Share on other sites
CyberSlug

AdlibEnable("ClickBox", 250);checks for window every 250 millisecs

HotKeySet("{Esc}", "MyExit")
While 1
   Sleep(1000)
   MouseClick ("left", 149, 70, 1, 3)
   Sleep(5500)
   MouseClick ("left", 187, 171, 1, 3)
Wend

Func MyExit()
    Exit
EndFunc 

Func ClickBox()
; if the message box that pops up is active then sending a space, usually has the same effect as clicking the default button
If WinActive("Name of that message box goes here")  Then
   Send("{Space}")
EndIf
EndFunc

Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.