Arez Posted March 22, 2006 Share Posted March 22, 2006 This is the code I need help with: While 1 Send("{ALT}") WEnd MouseClick("left", 631, 0, 2, 2.5) It gets stuck on alt and doesn't go to the next thing. Is there any way for it to keep alt held down while the mouse moves? Link to comment Share on other sites More sharing options...
cppman Posted March 22, 2006 Share Posted March 22, 2006 (edited) HotKeySet("{esc}", "_Close") While 1 Send("{ALT}" & MouseClick("left", 631, 0, 2, 2.5)) WEnd Func _Close() Exit EndFunc You had the MouseClick() outside the While loop... so it would be impossible to get to it with just that code... If i were you, i would put that hotkey in their, so u can get out of the program without having to restart your computer. Edited March 22, 2006 by CHRIS95219 Miva OS Project Link to comment Share on other sites More sharing options...
greenmachine Posted March 22, 2006 Share Posted March 22, 2006 HotKeySet("{esc}", "_Close") While 1 Send("{ALT}" & MouseClick("left", 631, 0, 2, 2.5)) WEnd Func _Close() Exit EndFunc You had the MouseClick() outside the While loop... so it would be impossible to get to it with just that code... If i were you, i would put that hotkey in their, so u can get out of the program without having to restart your computer. Since when do you need to restart your computer to close an AutoIt script? Also - you might want to do Send ("{ALTDOWN}") before the mouseclick and Send ("{ALTUP}") after (does the same as alt+click. Link to comment Share on other sites More sharing options...
cppman Posted March 22, 2006 Share Posted March 22, 2006 Since when do you need to restart your computer to close an AutoIt script?Also - you might want to do Send ("{ALTDOWN}") before the mouseclick and Send ("{ALTUP}") after (does the same as alt+click.since the mouse moves to a position at the top of my screen and keeps clicking so all windows will loose FOCUS...??? Miva OS Project Link to comment Share on other sites More sharing options...
Arez Posted March 22, 2006 Author Share Posted March 22, 2006 I have about fifty different mouse coordinates, Send("") functions and so on in the code I have. Alt needs to be pressed for all. Is there any way to make it more general instead of just for that specific thing? Link to comment Share on other sites More sharing options...
greenmachine Posted March 22, 2006 Share Posted March 22, 2006 ALTDOWN..... Link to comment Share on other sites More sharing options...
cppman Posted March 22, 2006 Share Posted March 22, 2006 I have about fifty different mouse coordinates, Send("") functions and so on in the code I have. Alt needs to be pressed for all. Is there any way to make it more general instead of just for that specific thing? Just do Send("{ALTDOWN}") before all the mouse clicks... then after all the mouse clicks are done, do Send("{ALTUP}") ex.. While 1 Send("{ALTDOWN") ;Mouse Clicks go here ;Mouse Clicks go here ;Mouse Clicks go here ;Mouse Clicks go here Send("{ALTUP}") WEnd Miva OS Project Link to comment Share on other sites More sharing options...
Arez Posted March 22, 2006 Author Share Posted March 22, 2006 Thanks for the help guys, works fine Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now