Jump to content

Simulating a key being pushed AND HELD DOWN

Recommended Posts

Hello. I'm new to this whole autoit business but have made a few working scripts/bots for a bunch of games/programs and... well, there is one thing that is really bugging me.

I want to replicate the following task using a script:

- Hold enter key down

- Right click a bunch of times at certain co-ordinates while enter key is still held down

- Release enter key

Simple, right?

Is it possible?

I was under the impression that you could simply use the following lines of code to simulate the enter key being held down for 5 seconds:

send ( "enter down" )

sleep ( 5000 )

send ( "enter up" )

but it does not seem to work.

For troubleshooting purposes, open up the notepad.exe and run the code there - it should hold down the enter key for 5 seconds and create a ton of blank lines, right?

So why doesn't it do it?

Could (and will they) anyone explain to me how to perform such a task (it seems like such a simple one and it's driving me nuts Q_Q )?

Thank you so much D:

Link to post
Share on other sites
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...