Sign in to follow this  
Followers 0
langi890

Please Help Me With Mouse Klicks !

4 posts in this topic

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 ] )

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

Thank you very much :)

now its workign great

Share this post


Link to post
Share on other sites

Thank you very much :)

now its workign great

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0