--- Thomas wrote:
> I use present:
> --8<---------------cut here---------------start------------->8---
> @myproglaunch
> If (anywindow("=myprog") == 0)
> do("%ProgramFiles%\\Myprog\\myprog.exe", "")
> Wait.for(activewindow "MyProgCaption! Start")
> Win.Keys("{to MyProgCaption Start}1234567890{enter}")
> Elseif (anywindow("=myprog") == 1)
> Win.Show("MyProgCaption AnyText*")
> Endif
> Quit
> --8<---------------cut here----------------end-------------->8---
Your above code can also be written as:
@MyProgLaunch
If(AnyWindow("=MyProg")) Do
Win.Show("MyProgCaption AnyText*")
Else
%ProgramFiles%\MyProg\MyProg.exe
Wait.For(AnyWindow("MyProgCaption! Start"))
Win.Keys("1234567890{Enter}")
EndIf
Quit
You may find that this works better for you because:
��* You failed to add Do after your If(), which means that PowerPro
��� will probably only perform the next line if your If() line
��� evaluates to true, and perform all of the remaining lines without
��� regard to the If() condition.
��* If you are waiting until the window becomes active then you don't
��� need to make it active again in Win.Keys().
��* The Do() syntax is not needed because you aren't using any
��� variables.
--
Alex Peters / Melbourne, Australia
PowerPro v3.8.21 / Windows XP
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> 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/