muzle6074 Posted July 9, 2008 Posted July 9, 2008 What's wrong with this "If" statement? I tried using <> and Not. I also tried using "Or" and "And" statements but none worked muttley Can sum1 fix this? $winStats = WinGetPos($win); 1032 * 795 If $winStats[2] <> 1032 Or $winStates[3] <> 795 Then MsgBox(16, "Counter", "Error validating " & $win & " window") Exit EndIf Regards.
newbiescripter Posted July 9, 2008 Posted July 9, 2008 What's wrong with this "If" statement? I tried using <> and Not. I also tried using "Or" and "And" statements but none worked muttley Can sum1 fix this? $winStats = WinGetPos($win); 1032 * 795 If $winStats[2] <> 1032 Or $winStates[3] <> 795 Then MsgBox(16, "Counter", "Error validating " & $win & " window") Exit EndIf Regards. First I see that the variables in the line below isn't the same: If $winStats[2] <> 1032 Or $winStates[3] <> 795 Then Try Change it to: If $winStats[2] <> 1032 Or $winStats[3] <> 795 Then See if it works then.. Regards
maroesjk Posted July 9, 2008 Posted July 9, 2008 (edited) I guess this is what you want:$winStats = WinGetPos($win); 1032 * 795 If Not ($winStats[2] = 1032 And $winStats[3] = 795) Then MsgBox(16, "Counter", "Error validating " & $win & " window") Exit EndIfI guess the problem in the "If" statement you provided is that the second half of the statement refers to "$winStates" instead of "$winStats"...My answer came too late... Edited July 9, 2008 by maroesjk
muzle6074 Posted July 9, 2008 Author Posted July 9, 2008 Thanks guys, I feel like such an idiot muttley
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now