Sign in to follow this  
Followers 0
Scinner

Loop (repeat)

4 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



While..WEnd Loop will do that:

While 1
    Sleep(60000*2)
    MouseClick("Left", 0, 0, 1)
WEndoÝ÷ Øò¢ìÛhvaÆîØ¥ý»(ëax

Kurt


Awaiting Diablo III..

Share this post


Link to post
Share on other sites

While..WEnd Loop will do that:

While 1
    Sleep(60000*2)
    MouseClick("Left", 0, 0, 1)
WEndoÝ÷ Øò¢ìÛhvaÆîØ¥ý»(ëax

Kurt

Thank you very much kurt, It worked very nice. And also TY for the extra Until code.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

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  
Followers 0