Jump to content
Sign in to follow this  
b212

I've problem with script.

Recommended Posts

b212

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:

Share this post


Link to post
Share on other sites
this-is-me

If you are trying to run that script, you are posting in the wrong forum. The script you have is a v.3 script. Also, if you are trying to run that script with autoit v.2 then that is the reason you get the error.


Who else would I be?

Share this post


Link to post
Share on other sites
phillip123adams

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

Share this post


Link to post
Share on other sites
layer

maybe it was the ";" signs?


FootbaG

Share this post


Link to post
Share on other sites
killaz219

maybe it was the ";" signs?

<{POST_SNAPBACK}>

the ";" signs would have nothing to do with it, since they are never really included when you use the script.

Share this post


Link to post
Share on other sites
layer

i know, i was tired at that time :idiot:


FootbaG

Share this post


Link to post
Share on other sites
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.