Abstract Posted May 8, 2006 Posted May 8, 2006 Hi There.. Long Time Lurker.. Extremely Seldom Poster What I'm Currently Trying To Do, Is Force Mouse Movements Untill A Specific Keypress Is Registered.. And At That Point, Pause The Entire Script Untill That Keypress Is Registered Again.. My Current Level Of Coding Is Nil, I'm Parting Out The Doc's As I Can And Using The Window Recording Function.. But All I've Mustered Up So Far Is Simple Mouse Movement And Interaction Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) MouseMove(804,510) MouseClick("left", 804,510, 1) Sleep(250) MouseMove(812,541) MouseClick("left", 812,541, 1) Sleep(1000) If Anyone Has The Time To Slap Together A "press p to start automation, and p again to pause it" Script, You Would Make My Life. =D
seandisanti Posted May 8, 2006 Posted May 8, 2006 (edited) Hi There.. Long Time Lurker.. Extremely Seldom Poster What I'm Currently Trying To Do, Is Force Mouse Movements Untill A Specific Keypress Is Registered.. And At That Point, Pause The Entire Script Untill That Keypress Is Registered Again.. My Current Level Of Coding Is Nil, I'm Parting Out The Doc's As I Can And Using The Window Recording Function.. But All I've Mustered Up So Far Is Simple Mouse Movement And Interaction Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) MouseMove(804,510) MouseClick("left", 804,510, 1) Sleep(250) MouseMove(812,541) MouseClick("left", 812,541, 1) Sleep(1000) If Anyone Has The Time To Slap Together A "press p to start automation, and p again to pause it" Script, You Would Make My Life. =Dthe helpfile entry for hotkeyset has a pause demo script you should be able to implement. Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d ;;;; Body of program would go here;;;; While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc ***edit*** put my start code tag where it should have been. Edited May 8, 2006 by cameronsdad
Abstract Posted May 8, 2006 Author Posted May 8, 2006 Thank You Very Much, Will Double Check The Help File At That Point.. Maybe I Missed It!
JSThePatriot Posted May 8, 2006 Posted May 8, 2006 I wrote this up to keep some computers awake while running some upgrades on them...hope it helps. ; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") ;;;; Body of program would go here;;;; While 1 MouseMove(Random(1, @DesktopWidth), Random(1,@DesktopHeight)) Sleep(1000) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Most of that was pulled directly from the helpfile. Check out HotKeySet to see what you can change that "{PAUSE}" key to. Or just leave it that way if that is the key you are looking for. Dont forget to give credit if you are going to use my script. Thanks, JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
Abstract Posted May 8, 2006 Author Posted May 8, 2006 JS, I Might Not Use Your Script Directly, But I Think I Might "steal" That First Quote In Your Signature Who Said That, BTW? Any Idea?
JSThePatriot Posted May 8, 2006 Posted May 8, 2006 JS, I Might Not Use Your Script Directly, But I Think I Might "steal" That First Quote In Your Signature Who Said That, BTW? Any Idea?hehe... I dont care... most of my code was copied and pasted out of the helpfile I appreciate your honesty in asking for code directly and not whining about it.The first quote in my sig... well the first sentance is the actual quote... I added the second sentance myself about a year ago.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
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