Jump to content

Need mouseclick function to operate after keystrokes


Marty4
 Share

Recommended Posts

When my script runs, the MouseMove function is occuring before my Send functions. Basically I need a set of Send functions occur first before the mousemove function occurs. How is this possible? The structure I need is this: send, send, send, send, mousemove, mouse click, mouse move, mouse click. Actually, there are about 20 Send functions that I need to occure before the mousemoves and mouseclicks. Any help would be apprecaited.

Marty

Link to comment
Share on other sites

When my script runs, the MouseMove function is occuring before my Send functions. Basically I need a set of Send functions occur first before the mousemove function occurs. How is this possible? The structure I need is this: send, send, send, send, mousemove, mouse click, mouse move, mouse click. Actually, there are about 20 Send functions that I need to occure before the mousemoves and mouseclicks. Any help would be apprecaited.

Marty

It's probably the application taking a while to process the keys sent. So try inserting a Sleep() after the sends and before the mouse commands

e.g.

Send("A")
Send("A")
Send("A")
Send("A")
Send("A")
Sleep(500) ;wait for half a second
MouseMove()
MouseMove()
MouseClick()

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

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...