Sign in to follow this  
Followers 0
B3TA_SCR1PT3R

if statement needed?

3 posts in this topic

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]

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

blindwig beat me to it.

Edited by SerialKiller

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