Hi,
Using PowerPro 4.5.11 Beta. I had the following on a button:
Exec and Prompt
Prompt was: zYes Are you sure you want to run this backup program?
Commands were:
if(zYes == 1)
"C:\Run-Backup\H Backup Normal Log.bat"
*Wait for (300,activewindow("*cmd.exe*"))
*Keys (to *windows\system32*)a
*Wait for 300
*Keys (to *windows\system32*)a
When I clicked on the button, an error message appeared. "Bad
Expressions: wrong use of comma or function. Check that function calls
have correct numbre of arguments ) (300,activewindow,("*cmd.exe*"))
The error had an Ok button. I clicked it, the dialog box disappeared
momentarily and then the error reappeared. Clicked Ok again, error
disappeared and then reappeared. Clicked Ok once more, error
disappeared and reappeared etc. No matter how many times you click Ok,
the error reappears. To try and stop the endless loop PowerPro seemed
to have got itself in to, I tried to open my PowerPro bar to access my
task manager button. However, while the error is onscreen, my PowerPro
bar would not appear (it is ste to appear when you bump the top of the
screen). It seems that the dialog error had focus, and would not give
it up for any program, including PowerPro. I then tried closing the
batch file (cmd window) that the button opened - this also did not get
rid of the error. The only way to get rid of it was to bring up Task
Manager via the Windows key combination and kill the PowerPro.exe
process. The non appearance of the PowerPro bar and the constant
error, even when the original program the button launched had been
closed is I think bad error handling by PowerPro.
Also, I copied the "*Wait for (300,activewindow("*cmd.exe*"))" line
from an example in the PowerPro help file. Why is it incorrect? What I
want to do is to wait until the batch file cmd window appears, and
then send those keystrokes to the cmd window. I initially had it as
*Wait for 300, but the problem is, the first time you run the batch
file, it is not cached, so 300 can sometimes be a too short wait, and
PowerPro will not send the keystroke to the window. On subsequent
runnings, the batch file has been cached, so 300 is an adequate wait.
Anyway, I went looking in the PowerPro help file and found the
activewindow example. I cut and pasted it from the help file into the
button, and this was the first time I had ever tried it.
--
Regards,
CM
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/power-pro/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/