Jump to content

Making autoit respond 2 keys?


Guest StuartSalamon
 Share

Recommended Posts

Guest StuartSalamon

I know this is a fairly simple question i just cannot figure it out so any help would be awsome. I was wondering if anyone could show me some code so that when i hit esc. it makes it so my mouse moves clicks and then .2 secounds later it presses f3. i have all of it but making it so it responds 2 a key. thanks for the help!

MouseMove (92, 17)

MouseClick("left")

Sleep(20)

Send("{F3}")

thats wha i have so far.

Thanks in advance!

Link to comment
Share on other sites

for that code to work you have to have a loop keeping the script running like this:

HotKeySet("{ESC}", "DoIt")

While 1
   Sleep ( 10 )
WEnd

Func DoIt()
  MouseMove (92, 17)
  MouseClick("left")
  Sleep(200) ;200ms
  Send("{F3}")
EndFunc

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...