b212 Posted December 25, 2004 Share 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 Link to comment Share on other sites More sharing options...
this-is-me Posted December 25, 2004 Share 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? Link to comment Share on other sites More sharing options...
b212 Posted December 25, 2004 Author Share Posted December 25, 2004 OK, end of topic, script works good at 3.0 version. Thanks. Link to comment Share on other sites More sharing options...
Guest Guidosoft Posted December 26, 2004 Share Posted December 26, 2004 AutoIt v2 sucks. Get v3. Link to comment Share on other sites More sharing options...
phillip123adams Posted December 26, 2004 Share 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 Link to comment Share on other sites More sharing options...
layer Posted December 27, 2004 Share Posted December 27, 2004 maybe it was the ";" signs? FootbaG Link to comment Share on other sites More sharing options...
killaz219 Posted December 27, 2004 Share 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. Link to comment Share on other sites More sharing options...
layer Posted December 28, 2004 Share Posted December 28, 2004 i know, i was tired at that time FootbaG Link to comment Share on other sites More sharing options...
Recommended Posts