Sign in to follow this  
Followers 0
whatever

Reffering to more than one window in one IF statement

2 posts in this topic

Heres the code

While 1

If WinExists("Kalkylatorn") Then 
    WinClose("Kalkylatorn")
    MsgBox( 0, "No", "This program is not supposed to execute" )
EndIf

If WinExists("Kalkylatorn2") Then 
    WinClose("Kalkylatorn2")
    MsgBox( 0, "No", "Neither this program is supposed to execute" )
EndIf

Sleep (200)

Wend

Is it possible to refer to more than one program in ONE if like this? Example:

If WinExists("Kalkylatorn" "Kalkylatorn2") Then 
    WinClose("Kalkylatorn" "Kalkylatorn2")
    MsgBox( 0, "No", "This program is not supposed to execute" )
EndIf

I know this is not the right method, but you get the picture, right? :lmao:

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

WinExists("Kalkylatorn") Or WinExists("Kalkylatorn2")

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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