Sign in to follow this  
Followers 0
hefty

how come my mouse wont click

10 posts in this topic

i want my mouse to left click 100 times and then stop.

however when i press F3 it doesnt even click a single time.

why

; Script Start - Add your code below here
WinWaitActive("The Matrix Online")

HotKeySet("{F3}", "Start")
While 1
    Sleep(100)
WEnd

func Start()
    $i = 0
    while $i < 100
        mouseclick(left)
        MsgBox(0, "Value of $i is:", $i)
        $i = $i + 1
    WEnd
EndFunc

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I just ran this code here, and im getting message boxes... not a line of clicks... do you want a bunch of clicks??.. or message boxes??

HotKeySet("{F3}", "Start")
While 1
    Sleep(100)
WEnd

Func Start()
    $i = 0
    While $i < 100
        MouseClick("left")
        ;MsgBox(0, "Value of $i is:", $i)
        $i = $i + 1
    WEnd
EndFunc   ;==>Start

EDIT: That particular msgbox, doesnot need to be shown... and it works now... if you want the script to exit then add an exit command after the WEnd and before the EndFunc

neat little script

Edited by seiryklav

ContactAim- bluehydrolic

Share this post


Link to post
Share on other sites

I just ran this code here, and im getting message boxes... not a line of clicks... do you want a bunch of clicks??.. or message boxes??

HotKeySet("{F3}", "Start")
While 1
    Sleep(100)
WEnd

Func Start()
    $i = 0
    While $i < 100
        MouseClick("left")
        MsgBox(0, "Value of $i is:", $i)
        $i = $i + 1
    WEnd
EndFunc   ;==>Start
no i dont want message boxes. u got message boxes? i dont get anything when i press f3

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

ok yeah it does work. ii removed winwait and it worked.

but how come it doesnt work inside the game?

Edited by hefty

Share this post


Link to post
Share on other sites

HotKeySet("{F3}", "Start")
While 1
    Sleep(100)
WEnd

Func Start()
    While 100
        MouseClick("left")
    WEnd
EndFunc

hm? well, I just did it the easy way and just wrote while 100...


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

HotKeySet("{F3}", "Start")
While 1
    Sleep(100)
WEnd

Func Start()
    While 100
        MouseClick("left")
    WEnd
EndFunc

hm? well, I just did it the easy way and just wrote while 100...

While 100? :whistle: Edited by Manadar

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

erm? is that..wrong?

... now i feel like I did something stupid... err....

Edited by MethodZero

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Help file on While .. Wend

If the expression is true the following statements up to the WEnd statement are executed. This loop continues until the expression is false.

100 and 1 are both true. So, it's not wrong.. but it doesn't loop it 100 times either.. :whistle:

Edited by Manadar

Share this post


Link to post
Share on other sites

:whistle:

Yea.... i...knew that! I was just testing you.... :P

erm...

while 99+1 ?


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

:whistle:

Yea.... i...knew that! I was just testing you.... :P

erm...

while 99+1 ?

To see if a function is false or not use this:

$Expression = 99+1

If $Expression Then
      MsgBox(0,"","This expression is true.")
Else
      MsgBox(0,"","This expression is false.")
EndIf

The same logic is behind While as If, and Do, and a lot more..

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