invis2 Posted September 28, 2010 Share Posted September 28, 2010 I had some help with this script a few days ago and have expanded its capabilitys. but i am finding that between the mouse moves in particular my program isnt always responding and the script hangs or gets lost. Sometimes it works flawlessly and others not . Could someone give me some pointers on how i can analyse whats going wrong or give me some suggestions as to what to try. any and all input gratefully recieved. Script as is below: expandcollapse popupHotKeySet("{ESC}", "EndProg") HotKeySet("^1","StartProg1") ;Hotkey Alt+1 HotKeySet("^2","StartProg2") ;Hotkey Alt+2 HotKeySet("^3","StartProg3") ;Hotkey Alt+3 HotKeySet("^4","StartProg4") ;Hotkey Alt+4 ; Infinite loop While 1 Sleep ( 20 ) WEnd Func StartProg1() MouseClick ("right") $pos = MouseGetPos() MouseMove($pos[0] + 80, $pos[1] + 55, 0) Sleep (1000) MouseMove($pos[0] + 250, $pos[1] + 55, 0) Sleep (100) Send ("{ENTER}") Sleep (400) Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{ENTER}") Send ("{TAB}") Send ("{ENTER}") EndFunc Func StartProg2() MouseClick ("right") $pos = MouseGetPos() MouseMove($pos[0] + 85, $pos[1] + 80, 0) Sleep (1000) MouseMove($pos[0] + 250, $pos[1] + 80, 0) Sleep (100) Send ("{ENTER}") Sleep (400) Send ("{NUMPAD0}") Send ("{.}") Send ("{NUMPAD3}") Send ("{TAB 5}") Send ("{ENTER}") Send ("{TAB}") Send ("{ENTER}") EndFunc Func StartProg3() MouseClick ("right") $pos = MouseGetPos() MouseMove($pos[0] + 80, $pos[1] + 80, 0) Sleep (1000) MouseMove($pos[0] + 250, $pos[1] + 100, 0) Sleep (100) Send ("{ENTER}") Sleep (400) Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{ENTER}") Send ("{TAB}") Send ("{ENTER}") EndFunc Func StartProg4() MouseClick ("right") $pos = MouseGetPos() MouseMove($pos[0] + 80, $pos[1] + 55, 0) Sleep (1000) MouseMove($pos[0] + 250, $pos[1] + 80, 0) Sleep (100) Send ("{ENTER}") Sleep (400) Send ("{NUMPAD0}") Send ("{.}") Send ("{NUMPAD2}") Send ("{TAB 4}") Send ("{ENTER}") Send ("{TAB}") Send ("{ENTER}") EndFunc Func EndProg() Exit EndFunc Link to comment Share on other sites More sharing options...
Bert Posted September 28, 2010 Share Posted September 28, 2010 Look at the following commands: WinWait ControlSend The Vollatran project My blog: http://www.vollysinterestingshit.com/ 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