Jump to content

Help with button script


Recommended Posts

I need help with a script that when i press the hotkey space, it will automatically press and hold the keyboard button "D" for a certain amount of time, lets say, 1 second and it releases.

i know that the function "Send" is used for dis but i just need help to how.

help is appreciated

Link to comment
Share on other sites

I need help with a script that when i press the hotkey space, it will automatically press and hold the keyboard button "D" for a certain amount of time, lets say, 1 second and it releases.

i know that the function "Send" is used for dis but i just need help to how.

help is appreciated

Its all in the helpfile:

To hold a key down (generally only useful for games)

Send("{a down}") ;Holds the A key down

Send("{a up}") ;Releases the A key

HotKeySet("{Space}", "Hold_D")

While 1
  Sleep(100)
WEnd

Func Hold_D()
  Send("{d Down}")
  Sleep(1000);chage this to time you want to hold
  Send("{d Up}")
EndFunc

EDIT: Removed excessive spaces.

Edited by Paulie
Link to comment
Share on other sites

ahhhh it doesnt work when i try to use it ingame. The game im playing blocks the Send function so i can't use it ingame, i heard about virtual machine but i don't know how to use it. Anyone got a way to bypass the game? It won't let me send key presses and mouse strokes....

or if u could help me with virtual machine i would appreciate it thank you

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