Regency Posted November 22, 2007 Share Posted November 22, 2007 I am trying to make this check if i have a script check in my inbox. But everytime it gets to wingettitle it gets messed up and doesnt do the rest of the if statement.. anyone fix it or help me? Happy thanksgiving btw everyone... #include <IE.au3> $mail = "" MyFunction() $mail = TimerInit() While 1 Sleep(10) $dif = Int(TimerDiff($mail)/1000) If $dif >= (1 * 10) Then MyFunction() $mail = Timerinit() Endif WEnd Func MyFunction() $oIE=_IECreate("http://www.themafianetwork.net/mail.aspx?") _IELoadWait($oIE) _IELinkClickByText($oIE, "Automatic Script Check") _ieloadwait($oIE) If WinGetTitle("TMN2 - Microsoft Internet Explorer") Then exit ElseIf WinGetTitle("TMN2 - Bloody Vendetta - Microsoft Internet Explorer") Then _iequit($oIE) Endif EndFunc ;==>MyFunction Link to comment Share on other sites More sharing options...
Zedna Posted November 22, 2007 Share Posted November 22, 2007 I think you should use WinExists() instead of WinGetTitle(). Also consider if you want to use Exit (and not Return) inside of your MyFunction() function Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
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