Jump to content

I've problem with script.


b212
 Share

Recommended Posts

Its my script code:

sleep(2000);
For $i = 1 to 100000
send("{right}");
sleep(10);
Next

When I try to run it I have error:

"Line1:

sleep(2000);

Error: Uknown command."

What I'm doing wrong?

I want to know one thing - how to make program which mouse button? I want to make something what will emulating putting right mose button. What I should paste instead of "{right}"???

Thanks for any help, and sorry - I know - my English isn't perfect :idiot:

Link to comment
Share on other sites

Its my script code:

sleep(2000);
For $i = 1 to 100000
send("{right}");
sleep(10);
Next

When I try to run it I have error:

"Line1:

sleep(2000);

Error: Uknown command."

What I'm doing wrong?

I want to know one thing - how to make program which mouse button? I want to make something what will emulating putting right mose button. What I should paste instead of "{right}"???

Thanks for any help, and sorry - I know - my English isn't perfect  :idiot:

<{POST_SNAPBACK}>

1. If you are using AutoIt 3, you should not have received the error unless, perhaps, there is code above what you posted.

2. I assume you know the location where the right click should be performed. For the example below, I will use the current position of the mouse.

$Mpos = MouseGetPos( )
$X = $Mpos[0]
$Y = $Mpos[1]
$NumClicks = 100; Adjust the number of clicks to your liking.
$ClickSpeed = 10; 1 is fastest, 100 is slowest.

sleep(2000)
; The following is the line of code you are looking for.  It replaces the entire For/Next loop.
MouseClick ("right", $X, $Y, $NumClicks, $ClickSpeed)

; Just to let you know when it completes
MsgBox(4096, "x", "All Done!")
Exit

Phillip

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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