Jump to content

Recommended Posts

Guest The_End
Posted (edited)

Heya, how do I make a script, that can simulate this:

Keypress: u

mouse: left click (on x,y )

wait: 5 secs

It just needs to do it in the open window, thanks.. :)

(prefebly with the option of making it run x times)

Edited by The_End
Posted (edited)

$x = whatever number you want...
$xcoord = whatever number you want...
$ycoord = whatever number you want...
For $i = 1 To $x
   Send("u")
   MouseClick("left", $xcoord, $ycoord)
   Sleep(5000)
Next

Edit: noticed you wanted x,y coordinates

Edited by andrew.arnott
Guest The_End
Posted

Heh, thanks.

But I get errors, when I try to run it.

It says unknown command, why is that? :)

Something I'm doing wrong, maybe?

Guest The_End
Posted

haha, yes. Ofcourse I did that. :)

I copy pasted that to notepad, saved it as *.aut

and then tryed to run it. Then it gave me an error on line one, unknown command

  • Moderators
Posted

haha, yes. Ofcourse I did that. :)

I copy pasted that to notepad, saved it as *.aut

and then tryed to run it. Then it gave me an error on line one, unknown command

<{POST_SNAPBACK}>

SciTE is the preferred editor here, and will help you with your syntax errors.

Should you have saved it as .aut or .au3?

Good Luck

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Guest The_End
Posted (edited)

Edit!

Thanks, I found it! :D

Thanks for the help!! :)

Edited by The_End
  • Moderators
Posted

Edit!

Thanks, I found it! :D

Thanks for the help!! :)

<{POST_SNAPBACK}>

Check the help for HotKey buttons, that will help you to stop or pause it.

Congrats.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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
×
×
  • Create New...