Lancelot 0 Posted April 26, 2004 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. Share this post Link to post Share on other sites
scriptkitty 1 Posted April 26, 2004 (edited) ; 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 April 26, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Share this post Link to post Share on other sites
Lancelot 0 Posted April 26, 2004 Thx it work good but when i press the pause button(second time i press it) the loop still on. It's stay in the loop. Share this post Link to post Share on other sites
Lancelot 0 Posted April 26, 2004 and can i change the "pause" key to something else? because pause make me log out of the app thx. Share this post Link to post Share on other sites
Lancelot 0 Posted April 27, 2004 everyting work good in notpad but in the game it dosent work??? Share this post Link to post Share on other sites
scriptkitty 1 Posted April 27, 2004 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+aIf you only wanted to repeat alt+X, you could just send("!x") AutoIt3, the MACGYVER Pocket Knife for computers. Share this post Link to post Share on other sites
Sveet 0 Posted April 27, 2004 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... Share this post Link to post Share on other sites
Sveet 0 Posted April 27, 2004 and what game is this for??? Share this post Link to post Share on other sites
scriptkitty 1 Posted April 27, 2004 one problem with that Sveet is that once the alt key is held down, you can't do your control E, you would have to use !^e or !e because everything gets a free alt. AutoIt3, the MACGYVER Pocket Knife for computers. Share this post Link to post Share on other sites