langi890 Posted November 26, 2008 Share Posted November 26, 2008 Hi I just begann with AutoIT yesterday i want to made me a little macro for Ecsro its a privat server now i want to open the programms i need to play the game the autopot tool and the autologin in tool to start the programs was easy its working good but i want to do mouse klicks in the macro for the "ok" buttons for example but every time i start the script it give me an error MouseClick( "Left" ^Error" Please help me Thanks Here is my source #include <Process.au3> $rc = _RunDos("start D:\MHTC\silkroad.exe ") $rc = _RunDos("start C:\Users\langi\Desktop\games\SRO_Win_Mod.exe ") $rc = _RunDOS("start C:\Users\langi\Desktop\games\SRO_AUTO.exe ") Sleep (3000) MouseClick( "Left" [, 756,789 ] ) MouseClickDelay(default=1000) MouseClick( "left" [, 686,468] ) MouseClickDelay(Default=1000) MouseClick( "left" [, 850,782 ] ) Link to comment Share on other sites More sharing options...
Bert Posted November 26, 2008 Share Posted November 26, 2008 You have the mouseclick command typed wrong. #include <Process.au3> $rc = _RunDos("start D:\MHTC\silkroad.exe ") $rc = _RunDos("start C:\Users\langi\Desktop\games\SRO_Win_Mod.exe ") $rc = _RunDOS("start C:\Users\langi\Desktop\games\SRO_AUTO.exe ") Sleep (3000) MouseClick( "Left" , 756,789 ) MouseClickDelay(default=1000) MouseClick( "left" , 686,468 ) MouseClickDelay(Default=1000) MouseClick( "left" , 850,782 ) I removed the [] in the string. I can see how you got confused from reading the help file for it shows the command in the top of the section with the [] in the string. Usually when you see [] it means the command is optional, and you don't include [] when you use the option. A good tip is to look at the example script at the bottom of the page to see how the command is used. One thing you may want to do to make your script more stable is to use a WinWaitActive() command before you use the mouseclick. That way you could get rid of the sleep command, and no matter how long the window that has the place you want to click on takes to load, your script won't blow up. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
langi890 Posted November 26, 2008 Author Share Posted November 26, 2008 Thank you very much now its workign great Link to comment Share on other sites More sharing options...
langi890 Posted November 26, 2008 Author Share Posted November 26, 2008 Thank you very much now its workign great Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now