Window that stop Macro Sheduler
Moderators: JRL, Dorian (MJT support)
Window that stop Macro Sheduler
Hello !
I have one application with a tree window to select folders that stop Macro Scheduler.
Send, Press and the rest of commands no work.
How c'an I continue my script ?
Greetings,
Reimon
I have one application with a tree window to select folders that stop Macro Scheduler.
Send, Press and the rest of commands no work.
How c'an I continue my script ?
Greetings,
Reimon
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Window that stop Macro Sheduler
Thanks Bob.
The script is for a backup application.
When I PushButton button 'Destino' window similar to 'save as' (Excel or Word) is open and Macro Scheduler stop.
Instruccion "PushButton>Selecc*,Aceptar" not work and when I click manualy (with the mouse or Enter) on button "Aceptar" I see the message "Hello World!".
When appear the window "Selecc*" with the button "Aceptar" Macro Scheduler stops and wait until I click the button manualy.
The scrip is simple:
Change Directory>c:\CO\
Run Program>C:\G\CO\Cw.exe
Wait>5
Press Page Down
Wait>5
Press ALT
Send>a
Release ALT
Wait>5
PushButton>Cop*,Todas
Wait>5
PushButton>Cop*,Destino
Wait>5
PushButton>Selecc*,Aceptar (this not work)
Message>Hello World! (and I see this when I click manualy on button 'Aceptar')
Greetings,
Reimon
The script is for a backup application.
When I PushButton button 'Destino' window similar to 'save as' (Excel or Word) is open and Macro Scheduler stop.
Instruccion "PushButton>Selecc*,Aceptar" not work and when I click manualy (with the mouse or Enter) on button "Aceptar" I see the message "Hello World!".
When appear the window "Selecc*" with the button "Aceptar" Macro Scheduler stops and wait until I click the button manualy.
The scrip is simple:
Change Directory>c:\CO\
Run Program>C:\G\CO\Cw.exe
Wait>5
Press Page Down
Wait>5
Press ALT
Send>a
Release ALT
Wait>5
PushButton>Cop*,Todas
Wait>5
PushButton>Cop*,Destino
Wait>5
PushButton>Selecc*,Aceptar (this not work)
Message>Hello World! (and I see this when I click manualy on button 'Aceptar')
Greetings,
Reimon
Window that stop Macro Sheduler
I think that this window stops the Macro Scheduler and a possible solution is , I don't know for that way, click the button with other windows commad to close the window and later continue with another Macro.
that you think?
Greetings,
Reimon
that you think?
Greetings,
Reimon
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
A few thoughts come to mind:
1. This indicates that you are pushing a button in a different window.
If button is "Aceptar" then enter "&Aceptar"
3. Also make sure you have no trailing spaces at the end of any lines. In the Editor you can use Edit, Show All Chars, and Remove Trailing Spaces.
4. Also, I do not know what cw.exe does. But do you need for it to stop executing before the rest of the script is executed? If Yes, then add the following line before the Run Program line: Let>RP_WAIT=1. After the Run Program line you may want to reverse that to the default again: Let>RP_WAIT=0. Ending script looks like this:
1. This indicates that you are pushing a button in a different window.
It may not make a difference, but you might want to add a few more commands for stable window focus like this:PushButton>Cop*,Todas
Wait>5
PushButton>Cop*,Destino
Wait>5
PushButton>Selecc*,Aceptar (this not work)
2. You should also look at the "Aceptar" button and make sure it does not have an underscore "_" beneath one of the letters for a hot-key. If it does, then you need to add "&" before the letter, like this:SetFocus>Cop*
WaitReady>1
PushButton>Cop*,Todas
Wait>5
PushButton>Cop*,Destino
Wait>5
SetFocus>Selecc*
WaitReady>1
PushButton>Selecc*,Aceptar
If button is "Aceptar" then enter "&Aceptar"
3. Also make sure you have no trailing spaces at the end of any lines. In the Editor you can use Edit, Show All Chars, and Remove Trailing Spaces.
4. Also, I do not know what cw.exe does. But do you need for it to stop executing before the rest of the script is executed? If Yes, then add the following line before the Run Program line: Let>RP_WAIT=1. After the Run Program line you may want to reverse that to the default again: Let>RP_WAIT=0. Ending script looks like this:
Let>RP_WAIT=1
Change Directory>c:\CO\
Run Program>C:\G\CO\Cw.exe
Let>RP_WAIT=0
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Dear Bob.
I have proven everything and it doesn't work.
Finally, and to be for sure I don't make any error, I have erased the line where I press the button to Aceptar in selecc* window and I not see the message 'Hello World!' until I close manualy the window selecc*
Definitively the window selecc* stops Macro Scheduler and I believe that this test that it is not any error in the script.
Help please. That I can make?
Greetings,
Reimon
Change Directory>c:\CO\
Run Program>C:\G\CO\Cw.exe
Wait>5
Press Page Down
Wait>5
Press ALT
Send>a
Release ALT
Wait>5
PushButton>Cop*,Todas
Wait>5
PushButton>Cop*,Destino (it open window selecc*)
Wait>5
PushButton>Selecc*,Aceptar (LINE ERASED)
Message>Hello World! (and I see this only when I close manualy window selecc*)
I have proven everything and it doesn't work.
Finally, and to be for sure I don't make any error, I have erased the line where I press the button to Aceptar in selecc* window and I not see the message 'Hello World!' until I close manualy the window selecc*
Definitively the window selecc* stops Macro Scheduler and I believe that this test that it is not any error in the script.
Help please. That I can make?
Greetings,
Reimon
Change Directory>c:\CO\
Run Program>C:\G\CO\Cw.exe
Wait>5
Press Page Down
Wait>5
Press ALT
Send>a
Release ALT
Wait>5
PushButton>Cop*,Todas
Wait>5
PushButton>Cop*,Destino (it open window selecc*)
Wait>5
PushButton>Selecc*,Aceptar (LINE ERASED)
Message>Hello World! (and I see this only when I close manualy window selecc*)
Dear Reimon,
A few questions:
1. When running your script in question, is Macro Scheduler one of active windows?
2. Are there any other windows running concurrently?
3. When you push the button "Acceptar", is it a dialog box or a child window?
4. Does the Macro Scheduler icon (a gear) diappear from the systray (notification area)?
When coding Macro Scheduler script, it's a good practice to set a proper focus before firing keystrokes. For example,
Let>RP_WINDOWMODE=3
Run Program>C:\G\CO\Cw.exe
Wait>5
/* Please supply the full window title here */
SetFocus>xxx
Wait>.1
Press Page Down
Wait>5
Press ALT
Send>a
Happy scripting.
A few questions:
1. When running your script in question, is Macro Scheduler one of active windows?
2. Are there any other windows running concurrently?
3. When you push the button "Acceptar", is it a dialog box or a child window?
4. Does the Macro Scheduler icon (a gear) diappear from the systray (notification area)?
When coding Macro Scheduler script, it's a good practice to set a proper focus before firing keystrokes. For example,
Let>RP_WINDOWMODE=3
Run Program>C:\G\CO\Cw.exe
Wait>5
/* Please supply the full window title here */
SetFocus>xxx
Wait>.1
Press Page Down
Wait>5
Press ALT
Send>a
Happy scripting.
When this window open Macro Scheduler stop
Dear Amstrong,
A few questions:
1. When running your script in question, is Macro Scheduler one of active windows?
Yes
2. Are there any other windows running concurrently?
Yes
3. When you push the button "Acceptar", is it a dialog box or a child window?
Child window
4. Does the Macro Scheduler icon (a gear) diappear from the systray (notification area)?
No diappear, but I observed when script is running the gear flash but when selecc* window open, gear stop flash and Macro Scheduler wait until I close window manualy.
When this window open Macro Scheduler stop and no commands work until I close this window manualy and Macro Scheduler continue the script.
Thanks for your help.
Greetings,
Reimon
A few questions:
1. When running your script in question, is Macro Scheduler one of active windows?
Yes
2. Are there any other windows running concurrently?
Yes
3. When you push the button "Acceptar", is it a dialog box or a child window?
Child window
4. Does the Macro Scheduler icon (a gear) diappear from the systray (notification area)?
No diappear, but I observed when script is running the gear flash but when selecc* window open, gear stop flash and Macro Scheduler wait until I close window manualy.
When this window open Macro Scheduler stop and no commands work until I close this window manualy and Macro Scheduler continue the script.
Thanks for your help.
Greetings,
Reimon
Window that stop Macro Sheduler
This problematic window is to select the folder to save a backup.
I think the script is OK because I manipulate with scripts other windows and buttons without problems.
I attach information of the window:
1377040 - #32770 "Seleccione directorio"
852968 - Static "N&ombre de archivo:"
1376990 - Edit "__TEST__.TM"
1246040 - Static "&Carpetas:"
1114802 - Static "c:\"
983840 - Static "Mostrar archivos de &tipo:"
1704868 - Static "U&nidades:"
2818762 - ComboBox "c: "
3015382 - Button "Aceptar"
2425760 - Button "Cancelar"
2229148 - Button "&Red..."
3212026 - Button "Ay&uda"
2687770 - Button "&Sólo lectura"
Greetings,
Reimon
I think the script is OK because I manipulate with scripts other windows and buttons without problems.
I attach information of the window:
1377040 - #32770 "Seleccione directorio"
852968 - Static "N&ombre de archivo:"
1376990 - Edit "__TEST__.TM"
1246040 - Static "&Carpetas:"
1114802 - Static "c:\"
983840 - Static "Mostrar archivos de &tipo:"
1704868 - Static "U&nidades:"
2818762 - ComboBox "c: "
3015382 - Button "Aceptar"
2425760 - Button "Cancelar"
2229148 - Button "&Red..."
3212026 - Button "Ay&uda"
2687770 - Button "&Sólo lectura"
Greetings,
Reimon
Hello Ramon,
Thanks for your quick clarification.
When the gear stops flashing, it means all running scripts finish. When waiting for something (eg, Wait>, WaitReady>, WaitCursorChanged>, WaitWindowChanged>,…etc.), the gear remains flashing nonstop unless you press SHIFT+ESC.
Your script apparently exhibits a focus issue. I won’t assume there are no other windows whose title doesn’t embed “copâ€Â
Thanks for your quick clarification.
When the gear stops flashing, it means all running scripts finish. When waiting for something (eg, Wait>, WaitReady>, WaitCursorChanged>, WaitWindowChanged>,…etc.), the gear remains flashing nonstop unless you press SHIFT+ESC.
Your script apparently exhibits a focus issue. I won’t assume there are no other windows whose title doesn’t embed “copâ€Â
Window stops Macro Scheduler
Dear Armstorng,
Firts, very thanks for your help.
Please, read this script:
Change Directory>c:\CO\
Run Program>C:\G\CO\Cw.exe
Wait>5
Press Page Down
Wait>5
Press ALT
Send>a
Release ALT
Wait>5
PushButton>Cop*,Todas
Wait>5
PushButton>Cop*,Destino -> THIS OPEN THE PROBLEMATIC WINDOW
Wait>5
Message>Hello World! (and I see this message only when I close manualy the problematic window)
Now, I don't make any reference to the window that opens.
I think this indicate that this window stops Macro Scheduler.
That I can make? Please help.
Greetings,
Reimon
Firts, very thanks for your help.
Please, read this script:
Change Directory>c:\CO\
Run Program>C:\G\CO\Cw.exe
Wait>5
Press Page Down
Wait>5
Press ALT
Send>a
Release ALT
Wait>5
PushButton>Cop*,Todas
Wait>5
PushButton>Cop*,Destino -> THIS OPEN THE PROBLEMATIC WINDOW
Wait>5
Message>Hello World! (and I see this message only when I close manualy the problematic window)
Now, I don't make any reference to the window that opens.
I think this indicate that this window stops Macro Scheduler.
That I can make? Please help.
Greetings,
Reimon
Dear Reimon,
1. Does PushButton>Cop*,Todas work as expected? That's, do you actually observe that button has been "pushed"?
2. Message>Hello World! (and I see this message only when I close manualy the problematic window)
It's becuase Macro Scheduler searches for the FIRST window whoes title embeds "cop". Then, it simulate a pushbutton. In your case, obviously, Macro Scheduler found a wrong window. The desired window remains on your screen. That's why you have to "manually" press the button.
3. Sometimes PushButton fails. Personally I prefer the combination of:
MouseMove>
LClick
They never fail me once.
Happy scripting.
1. Does PushButton>Cop*,Todas work as expected? That's, do you actually observe that button has been "pushed"?
2. Message>Hello World! (and I see this message only when I close manualy the problematic window)
It's becuase Macro Scheduler searches for the FIRST window whoes title embeds "cop". Then, it simulate a pushbutton. In your case, obviously, Macro Scheduler found a wrong window. The desired window remains on your screen. That's why you have to "manually" press the button.
3. Sometimes PushButton fails. Personally I prefer the combination of:
MouseMove>
LClick
They never fail me once.
Happy scripting.
Macro Scheduler stop after open window
Dear Armstrong,
1. Does PushButton>Cop*,Todas work as expected? That's, do you actually observe that button has been "pushed"?
Yes it works as expected, select any options.
2. Message>Hello World! (and I see this message only when I close manualy the problematic window)
It's becuase Macro Scheduler searches the FIRST window whoes title embeds "cop". Then, it simulate a pushbutton. In your case, obviously, Macro Scheduler found a wrong window. The desired window remains on your screen. That's why you have to "manually" press the button.
In this version of script for test it, button 'Todas' work correctly and button 'Destino' work correctly (it open the problematic window) and I think after I should see the message and this doesn't happen this way. Macro Scheduler stop after open window and I no see the message.
Greetings,
Reimon
Change Directory>c:\CO\
Run Program>C:\G\CO\Cw.exe
Wait>5
Press Page Down
Wait>5
Press ALT
Send>a
Release ALT
Wait>5
PushButton>Cop*,Todas
Wait>5
PushButton>Cop*,Destino -> THIS OPEN THE PROBLEMATIC WINDOW
Wait>5
Message>Hello World! (and I see this message only when I close manualy the problematic window)
1. Does PushButton>Cop*,Todas work as expected? That's, do you actually observe that button has been "pushed"?
Yes it works as expected, select any options.
2. Message>Hello World! (and I see this message only when I close manualy the problematic window)
It's becuase Macro Scheduler searches the FIRST window whoes title embeds "cop". Then, it simulate a pushbutton. In your case, obviously, Macro Scheduler found a wrong window. The desired window remains on your screen. That's why you have to "manually" press the button.
In this version of script for test it, button 'Todas' work correctly and button 'Destino' work correctly (it open the problematic window) and I think after I should see the message and this doesn't happen this way. Macro Scheduler stop after open window and I no see the message.
Greetings,
Reimon
Change Directory>c:\CO\
Run Program>C:\G\CO\Cw.exe
Wait>5
Press Page Down
Wait>5
Press ALT
Send>a
Release ALT
Wait>5
PushButton>Cop*,Todas
Wait>5
PushButton>Cop*,Destino -> THIS OPEN THE PROBLEMATIC WINDOW
Wait>5
Message>Hello World! (and I see this message only when I close manualy the problematic window)
Window that stop Macro Sheduler
Dear Armstrong,
3. Sometimes PushButton fails. Personally I prefer the combination of:
MouseMove>
LClick
They never fail me once.
Very thanks for your sugestions but not work.
Any other command after de button 'Destino' not work.
Help please,
Greetings,
Reimon
3. Sometimes PushButton fails. Personally I prefer the combination of:
MouseMove>
LClick
They never fail me once.
Very thanks for your sugestions but not work.
Any other command after de button 'Destino' not work.
Help please,
Greetings,
Reimon
Finally, Work!!! Uff!!!
Very thanks.
Finally, Work!!! Uff!!!
Thank you and a strong hug.
Substituting all PushButton for
MouseMove>
LClick
Thank you another time.
Greetings,
Reimon
Finally, Work!!! Uff!!!
Thank you and a strong hug.
Substituting all PushButton for
MouseMove>
LClick
Thank you another time.
Greetings,
Reimon