Jump to content

Recommended Posts

Posted

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]

Posted

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

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
×
×
  • Create New...