Window that stop Macro Sheduler

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Ramon

Window that stop Macro Sheduler

Post by Ramon » Thu Jun 03, 2004 9:34 pm

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

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Thu Jun 03, 2004 10:46 pm

Description of problem needs more explanation.

Can you provide copy of the script, explain how to trigger problem, and symptoms?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Reimon
Pro Scripter
Posts: 55
Joined: Wed Mar 31, 2004 4:46 pm

Window that stop Macro Sheduler

Post by Reimon » Thu Jun 03, 2004 11:15 pm

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

Reimon
Pro Scripter
Posts: 55
Joined: Wed Mar 31, 2004 4:46 pm

Window that stop Macro Sheduler

Post by Reimon » Thu Jun 03, 2004 11:39 pm

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

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Jun 04, 2004 1:45 am

A few thoughts come to mind:

1. This indicates that you are pushing a button in a different window.
PushButton>Cop*,Todas
Wait>5
PushButton>Cop*,Destino
Wait>5
PushButton>Selecc*,Aceptar (this not work)
It may not make a difference, but you might want to add a few more commands for stable window focus like this:
SetFocus>Cop*
WaitReady>1
PushButton>Cop*,Todas
Wait>5
PushButton>Cop*,Destino
Wait>5
SetFocus>Selecc*
WaitReady>1
PushButton>Selecc*,Aceptar
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:
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!

Reimon
Pro Scripter
Posts: 55
Joined: Wed Mar 31, 2004 4:46 pm

Post by Reimon » Fri Jun 04, 2004 6:46 am

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*)

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Jun 04, 2004 1:18 pm

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.

Ramon

When this window open Macro Scheduler stop

Post by Ramon » Fri Jun 04, 2004 1:53 pm

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

Reimon
Pro Scripter
Posts: 55
Joined: Wed Mar 31, 2004 4:46 pm

Window that stop Macro Sheduler

Post by Reimon » Fri Jun 04, 2004 2:26 pm

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

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Jun 04, 2004 2:34 pm

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â€Â

Reimon
Pro Scripter
Posts: 55
Joined: Wed Mar 31, 2004 4:46 pm

Window stops Macro Scheduler

Post by Reimon » Fri Jun 04, 2004 2:49 pm

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

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Jun 04, 2004 3:02 pm

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.

Reimon
Pro Scripter
Posts: 55
Joined: Wed Mar 31, 2004 4:46 pm

Macro Scheduler stop after open window

Post by Reimon » Fri Jun 04, 2004 3:18 pm

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)

Reimon
Pro Scripter
Posts: 55
Joined: Wed Mar 31, 2004 4:46 pm

Window that stop Macro Sheduler

Post by Reimon » Fri Jun 04, 2004 3:25 pm

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

Reimon
Pro Scripter
Posts: 55
Joined: Wed Mar 31, 2004 4:46 pm

Finally, Work!!! Uff!!!

Post by Reimon » Fri Jun 04, 2004 3:39 pm

Very thanks.

Finally, Work!!! Uff!!!

Thank you and a strong hug.

Substituting all PushButton for
MouseMove>
LClick

Thank you another time.

Greetings,

Reimon

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts