b212 Posted December 25, 2004 Posted December 25, 2004 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
this-is-me Posted December 25, 2004 Posted December 25, 2004 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?
b212 Posted December 25, 2004 Author Posted December 25, 2004 OK, end of topic, script works good at 3.0 version. Thanks.
phillip123adams Posted December 26, 2004 Posted December 26, 2004 Its my script code:sleep(2000); For $i = 1 to 100000 send("{right}"); sleep(10); NextWhen 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 <{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
killaz219 Posted December 27, 2004 Posted December 27, 2004 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.
Recommended Posts