SFC has a problem in that it does not remember that the system cd is in the CD tray and keeps asking for it to be put there or Hit retry. Retry works until the next file it wants to confirm. This macro is intended to hit Retry every time the error window arises.
label>start
WaitWindowOpen>Windows file protection
press alt
send>R
release alt
goto>start
Windows file protection is the name of two windows that open when SFC is run. One is the main window showing the progress of the scan and the other the error message. How do I distinguish between the two windows? I want alt R to only apply to the error window.
Also how do I stop MacroS from freezing because the above loop has been operated too many times. Above a number of iterations MS seems to freeze.
Robin
System file checker
Moderators: Dorian (MJT support), JRL
First thing I'd try is set WF_TYPE to 3
Let>WF_TYPE=3
label>start
WaitWindowOpen>Windows file protection
press alt
send>R
release alt
goto>start
As for MS freezing after certain a number of iterations... I don't know what number that would be. I have computers that have been running for months with multiple scripts looping continuously every 100th of a second and they have never had a problem.
Let>WF_TYPE=3
label>start
WaitWindowOpen>Windows file protection
press alt
send>R
release alt
goto>start
As for MS freezing after certain a number of iterations... I don't know what number that would be. I have computers that have been running for months with multiple scripts looping continuously every 100th of a second and they have never had a problem.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Try adding a short delay inside the loop:
Wait>0.2
Goto>start
Wait>0.2
Goto>start
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
I'm guessing you changed the folder externally (outside of Macro Scheduler)?
Anyway, you will now need to import the macro. File/Import or File/New/Import.
Anyway, you will now need to import the macro. File/Import or File/New/Import.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Hi Robbyn,
Did you try Let>WF_TYPE=3 ?
If that didn't help, both windows have the same title so SetFocus may not help.
FindWindowWithText may be able to differentiate between the two windows if there is some text that always appears on one of them but not the other.
And as Help for FindWindowWithText says... "If the WIN_USEHANDLE variable is set to 1 result_variable will contain the window's handle" so you might use this to capture the handles of the two windows. Once you have the handles, you can run other commands that specify that handle and know which window you are targeting.
If none of that works, there are image recognition techniques. Look for recent posts here on this. You'd be looking to match a portion of the error window that is different from the other window but always the same for any error that might pop up.
Did you try Let>WF_TYPE=3 ?
If that didn't help, both windows have the same title so SetFocus may not help.
FindWindowWithText may be able to differentiate between the two windows if there is some text that always appears on one of them but not the other.
And as Help for FindWindowWithText says... "If the WIN_USEHANDLE variable is set to 1 result_variable will contain the window's handle" so you might use this to capture the handles of the two windows. Once you have the handles, you can run other commands that specify that handle and know which window you are targeting.
If none of that works, there are image recognition techniques. Look for recent posts here on this. You'd be looking to match a portion of the error window that is different from the other window but always the same for any error that might pop up.
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -