Hello chunwaihome,

you wrote...

> If (activewindow("*total commander"))do

> keys {alt}{f4}
> "C:\totalcmd\TOTALCMD.EXE"
> else
> win.show ("*total commander")
> keys {alt}{f4}
> "C:\totalcmd\TOTALCMD.EXE"

> Endif

Problem with your script might be usage of "*total commander" instead of
"total commander*" or even better "=Totalcmd". Also, instead of else you
should use ElseIf (AnyWindow("=Totalcmd"))

If possible it is better to use Win.Close command instead of Keys, like
in following script, not tested,

If (AnyWindow("=Totalcmd")) Do
Win.Close("=Totalcmd")
Wait.For(AnyWindow("=Totalcmd") == 0)
"C:\totalcmd\TOTALCMD.EXE"
EndIf



Attention: PowerPro's Web site has moved: http://www.ppro.org



YAHOO! GROUPS LINKS




Reply via email to