Jump to content

Loop (repeat)


Recommended Posts

Hi! How do I get the mouseklick part to repeat it self every 2 minutes. Is it with While and Wend?

How would it look?

As you surley can se Im a noob :P

CODE
Dim $primary

Dim $secondary

;Determine if user has swapped right and left mouse buttons

$k = RegRead("HKEY_CURRENT_USER\Control Panel\Mouse", "SwapMouseButtons")

; It's okay to NOT check the success of the RegRead operation

If $k = 1 Then

$primary = "right"

$secondary = "left"

Else ;normal (also case if could not read registry key)

$primary = "left"

$secondary = "right"

EndIf

MouseClick($secondary, 245, 110, 1) ;högerklick 1a torrent

Sleep(200)

MouseClick($primary, 270, 390, 1) ;uppdatera

Sleep(200)

MouseClick($secondary, 245, 130, 1) ;högerklick 2a torrent

Sleep(200)

MouseClick($primary, 270, 410, 1) ;uppdatera

Thank You

EDIT: Sorry about the comments, its swedish :whistle:

Edited by Scinner
Link to comment
Share on other sites

I made the script a little smaller and nicer by looking at Kurts suggestions, here it is.

While 1
    Sleep(60000*2)
    MouseClick("right", 245, 110, 1) ;högerklick 1a torrent
    Sleep(200)
    MouseClick("left", 270, 390, 1) ;uppdatera
    Sleep(200)
    MouseClick("right", 245, 130, 1) ;högerklick 2a torrent
    Sleep(200)
    MouseClick("left", 270, 410, 1) ;uppdatera
    Sleep(200)
    MouseClick("right", 245, 150, 1) ;högerklick 2a torrent
    Sleep(200)
    MouseClick("left", 270, 430, 1) ;uppdatera
WEnd

Starting to get small bits of this and I think its very fun.

Thanks guys!

Edited by Scinner
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...