Sign in to follow this  
Followers 0
Icemaan

Need Help by If Else Function

7 posts in this topic

Hello

I want write a Script with Autoit which start a Application. For Example there a three possible Windows I call it here a;b;c

I have write

If WinExist ("a") then run X thats go

but i want that autoit check all 3 Possible Windows also

If WinExist (a or b or c )then run x when nothing from this exist then run y

Can anybody help me

Thanks so much and sorry for my bad English

So long Icemaan

Share this post


Link to post
Share on other sites



Hello

I want write a Script with Autoit which start a Application. For Example there a three possible Windows I call it here a;b;c

I have write

If WinExist ("a") then run X thats go

but i want that autoit check all 3 Possible Windows also

If WinExist (a or b or c )then run x when nothing from this exist then run y

Can anybody help me

Thanks so much and sorry for my bad English

So long Icemaan

this should do the job

if winexists ("a") or winexists ("b") or winexists("c") then
run ("X")
else
run ("Y")
endif

hope that helps you

Share this post


Link to post
Share on other sites

this should do the job

if winexists ("a") or winexists ("b") or winexists("c") then
run ("X")
else
run ("Y")
endif

hope that helps you

Many thanks for your promptly answers.It works now

Be care

Icemaan

Share this post


Link to post
Share on other sites

np

glad i could help you

Ok can i write the following at the end

Sleep("500")

Winclose ("a") or ("b") or ("c")

I want do with this that the window which is open closed after the new window is open

Is this so correct

Icemaan

Share this post


Link to post
Share on other sites

Ok can i write the following at the end

Sleep("500")

Winclose ("a") or ("b") or ("c")

I want do with this that the window which is open closed after the new window is open

Is this so correct

Icemaan

I see that this is not correct so following statement come

Error: Illegal text at the end of statement (one Statement per line)

What i have make not correct

Icemaan

Share this post


Link to post
Share on other sites

try

if winexists ("a") then Winclose ("a")

if winexists ("b") then Winclose ("b")

if winexists ("c") then Winclose ("c")

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0