Arez Posted March 22, 2006 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?
cppman Posted March 22, 2006 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
greenmachine Posted March 22, 2006 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.
cppman Posted March 22, 2006 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
Arez Posted March 22, 2006 Author 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?
cppman Posted March 22, 2006 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
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