Is there any way to pause a macro and then play it right where it left off? Ive got a computer that I cant use because its running a macro, but every now and then I'd like to check things on the computer, but if I stop the macro in the middle of its cycle, its variables will get messed up. (each cycle is around 2 hours)
Help!
Can you pause a running macro? Not stop
Moderators: JRL, Dorian (MJT support)
-
- Newbie
- Posts: 7
- Joined: Thu Sep 01, 2005 2:10 am
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
Something to be careful of if pausing macros. Say you have a macro which at the beginning uses SetFocus to focus an application and then sends a whole load of keystrokes. Say you Pause it half way through and do something on the computer which changes the window focus and then resume the macro. The pending keystrokes will end up in the new window that you manually focused. So when resuming macros it will pay to put the system back in the state it was in when you paused.
MJT Net Support
[email protected]
[email protected]
An Easy Way... just using Mouse..
Here's an easy trick I do to suspend the program....
I put a "Move mouse here to PAUSE" dialog (or MSG box) at the bottom of the screen.
Then I simply check the mouse coordinates periodically within the program. If the GetCursorPos>X,Y coordinates fall within my dialog box... I display another non-modal dialog box at the bottom with optional buttons to RESUME, START OVER, or QUIT.
The GetCursorPos statement is misleading. It actually returns MOUSE position. There's a difference....
Hope this helps
I put a "Move mouse here to PAUSE" dialog (or MSG box) at the bottom of the screen.
Then I simply check the mouse coordinates periodically within the program. If the GetCursorPos>X,Y coordinates fall within my dialog box... I display another non-modal dialog box at the bottom with optional buttons to RESUME, START OVER, or QUIT.
The GetCursorPos statement is misleading. It actually returns MOUSE position. There's a difference....
Hope this helps
Why is it misleading? GetCursorPos gets the mouse cursor position. It gets the position of the Windows mouse cursor. For the text cursor use GetCaretPos.
MJT Net Support
[email protected]
[email protected]
GetCursorPos
Well, misleading initially to ME (I'm slow).
The documentation for GetCursorPos never mentons the word MOUSE.
So to me, there is a distinction... When using my word processor, the "cursor" is where the next character that I type will appear. The mouse position could be anywhere on the page.
If the Help file for Mouse commands included the hypertext link to this command, I probably wouldn't have missed it. Again: my mistake.
Now on a completely separate note: I am completely amazed by the quality of support that I/We receive from you guys at MJT.NET.. The mark of a great company is its commitment to its customers by continual product improvement. You guys are releasing new, improved versions faster than I can download them. Well done!
The documentation for GetCursorPos never mentons the word MOUSE.
So to me, there is a distinction... When using my word processor, the "cursor" is where the next character that I type will appear. The mouse position could be anywhere on the page.
If the Help file for Mouse commands included the hypertext link to this command, I probably wouldn't have missed it. Again: my mistake.
Now on a completely separate note: I am completely amazed by the quality of support that I/We receive from you guys at MJT.NET.. The mark of a great company is its commitment to its customers by continual product improvement. You guys are releasing new, improved versions faster than I can download them. Well done!
Fair point. I've just looked at the documentation and I see now that it doesn't mention the word mouse in GetCursorPos. I will make sure it is clarified next time it is updated.
MJT Net Support
[email protected]
[email protected]