Sign in to follow this  
Followers 0
ioliver

If Win (Does Not) Exist Question

4 posts in this topic

#1 ·  Posted (edited)

I'm sure there is an easy answer but I can' t seem to find it. I know about the:

If WinExists("Untitled -") Then

MsgBox(0, "", "Window exists")

EndIf

But what if I want to perform an action if the Widnows doesn't exist:

If WinExists("Untitled -") <> True Then

MsgBox(0, "", "Window exists")

EndIf

That's what I tried but it dosen't work.

Thanks for you help,

Ian

Edit: Would it be:

$ans = WinExists("Untitled -")

If $ans = 0

MsgBox(0, "", "Window exists")

EndIf

Would that work? Or, is there a better way to do it?

Thanks again,

Ian

Edited by ioliver

"Blessed be the name of the Lord" - Job 1:21Check out Search IMF

Share this post


Link to post
Share on other sites



I'm sure there is an easy answer but I can' t seem to find it.  I know about the:

<{POST_SNAPBACK}>

If NOT WinExists("Untitled -") Then
   MsgBox(0, "", "Window Doesn't exists")
EndIf

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Is this what you are looking for

If WinExists("Untitled -") Then
MsgBox(0, "", "Window Exists")
Else
MsgBox(0, "", "Window Does Not Exists")
EndIf

Share this post


Link to post
Share on other sites

Thank you, but 'If NOT WinExists("Untitled -") Then' is what I was looking for.

Ian


"Blessed be the name of the Lord" - Job 1:21Check out Search IMF

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