Jump to content
Sign in to follow this  
Guest StuartSalamon

Making autoit respond 2 keys?

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!

Share this post


Link to post
Share on other sites

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

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

Share this post


Link to post
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]

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...