Jump to content

Help Need!


Recommended Posts

OK what i wante to make is maybe simple for you guys but hard for me.

i wante to press a key, and when the key is press it goes like this

-alt (is hold all the time)

-X (is repeat constantly)

and when i press the key again

-X (is release)

-alt (is release)

-mouse 2 (is press but not hold)

Thx you in advance for all who will help thx.

Link to comment
Share on other sites

; the alt-down is {ALTDOWN}
hotkeyset("{pause}","pause")
hotkeyset("!{pause}","pause"); since alt is down, ya need !{pause} to stop it.
$pause=-1

while 1
sleep(10)
wend

Func pause()
$pause=NOT $pause
send("{ALTDOWN}")
while NOT $pause
send("x")
sleep(100); change for speed, but leave at 1 at least for CPU savings.
wend
send("{ALTUP}")
mouseclick("right"); mouse2???
EndFunc

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

some games capture certain keys. you can use almost any key you would like.

Look in the help file under send keys.

ex:

{SPACE} SPACE

{ENTER} ENTER key on the main keyboard

{ALT} ALT

{BACKSPACE} or {BS} BACKSPACE

{DELETE} or {DEL} DELETE

{UP} Cursor up

{DOWN} Cursor down

{LEFT} Cursor left

{RIGHT} Cursor right

{HOME} HOME

{END} END

{ESCAPE} or {ESC} ESCAPE

{INSERT} or {INS} INS

{PGUP} PGUP

{PGDN} PGDN

{F1} - {F12} Function keys

{TAB} TAB

{PRINTSCREEN} PRINTSCR

{LWIN} Left Windows key

{RWIN} Right Windows key

{NUMLOCK} NUMLOCK

{CTRLBREAK} Ctrl+Break

{PAUSE} PAUSE

{CAPSLOCK} CAPSLOCK

{NUMPAD0} - {NUMPAD9} Numpad digits

{NUMPADMULT} Numpad Multiply

{NUMPADADD} Numpad Add

{NUMPADSUB} Numpad Subtract

{NUMPADDIV} Numpad Divide

{NUMPADDOT} Numpad period

{NUMPADENTER} Enter key on the numpad

{APPSKEY} Windows App key

! infront of one is like sending alt+the key, so !a=alt+a

If you only wanted to repeat alt+X, you could just send("!x")

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

hotkeyset ( "^s" , start )
hotkeyset ( "^e" , quit )

Func start
$i = 5
send ( "{ALTDOWN}" )
do
send ( "X" )
untill $i = 0
EndFunc

Func quit
send ( "{ALTUP}" )
Exit
EndFunc

that makes CTRL+S start it and CTRL+E stop it. this should work... also, this doesnt pause it, but it will quit it for you... you just need to rerun after u do that... i could set up a popup window to ask u if you want to quit or continue... but im lazy, and at school...

Link to comment
Share on other sites

  • 4 years later...

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