Jump to content

if statement needed?


Recommended Posts

If WinExists("http://") Then
        $a = WinGetTitle("http://")
        WinClose("http://")

say i had a unblock.txt with a list of window titles to not block how would i word a If statement to read everyline and if it matches the title of windows with title in .txt to not close the window?

[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Link to comment
Share on other sites

Dim $aWinList
_FileReadToArray($sNoBlockFile, $aWinList)
_ArraySort($aWinList)

If _ArrayBinarySearch($aWinList, $sWindowTitle) Then
  MsgBox(0,'Window Listed', $sWindowTitle & ' is on the list')
Else
  MsgBox(0,'Window Not Listed', $sWindowTitle & ' is not on the list')
EndIf

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...