So, I turned on Tools/System Windows Monitor and found that the "window" is really something called a "ConsoleWindowClass" ?
I have tried running the program with the command in the path.
I have tried running the program using the full path.
I have tried running the program using cmd /c
All end up with the same result, I had to change the window name slightly for each one, since xxcopy.exe* did not work, I needed the full path showing in the Window Title
The command line program running in the window pauses with a message that I need to press "any key" to continue. So I am trying to SetFocus to the window so I can Send>AnyKey, else the program shuts down in two minutes if no key is pressed.
Here a sample test script that runs OK:
Code: Select all
Let>vOne=1
Let>vTwo=2
GoSub>TestOne
MessageModal>Sub is done
Goto>End
SRT>TestOne
Let>RP_WINDOWMODE=1
Run Program>C:\Program Files\XXcopy\xxcopy.exe Q:\*\* T:\Snap\ /CR8 /BU /PB /FF /CK0 /OAQ:\Data\Backups\Logs\20110824Msg.log /FoQ:\Data\Backups\Logs\20110824Files.log /FMSDTZAL /EXQ:\Data\Backups\Xxcopy\ExcludeList.txt
Wait>10
WaitWindowOpen>C:\Program Files\XXcopy\xxcopy.exe
Wait>2
Send>%SPACE%
WaitWindowClosed>Progress - XXCOPY
Let>RP_WINDOWMODE=0
MessageModal>Done
End>TestOne
Label>End
So, what else is different? Some variables at the beginning of the main script. I tried removing them and it looked like RP-WAIT was causing the problem. It was originally set = 1. I removed it, and it seemed to run OK, but only once. So I set RP_WAIT=2 and =0, and it also ran OK once only. Here is the code for the variables at the top of the real script:
Code: Select all
CAPSOFF
Let>SK_DELAY=10
Let>CF_OVERWRITE=1
Let>MSG_STAYONTOP=0
Let>RP_WAIT=2
Let>RP_WINDOWMODE=0
Let>Count=0
Again, it always hangs when WindowName=NOT FOUND with any of the Wait style windows using the Window Name. I am sure it is because this is a ConsoleWindowClass vs. a "normal window". Since I can't get the name, I can't get the handle either. The "window" is open, but no name.
All I want to do is SEND>AnyKey to the window so it will continue.
All good suggestions will be gratefully accepted.
The program I am running is XXCOPY, version 2.92.2
I am using Macro Scheduler 11.1.20 on Windows7 32bit Pro.