Regency Posted May 15, 2009 Share Posted May 15, 2009 Ok, i have this script, it works great (posted below), But i cant seem to wrap my head around how to do 2 different things with it. I want 1, to have the gui window flash when there is a message, and then there is the second problem, how would i have the GUI notice there is a new message, the message inbox has a different icon when there is mail, so a If statement to make it search for it? I dunno how to even get my head around that. Anyone wanna help?#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $oIE = ObjCreate("Shell.Explorer.2") $T = GUICreate("TMN Status Bar", 860, 30, _ (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2,$WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_EX_TOPMOST) $GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 884, 30) GUISetState(@SW_SHOWNOACTIVATE, $T) ;Show GUI $oIE.navigate("tmnx.net/authenticated/userinfo.aspx") ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete()The message inbox has this link when it has 1 message,http://tmnx.net/images/new_message_1.gifand http://tmnx.net/images/new_message_2.gifthat link when there is 2 or more messages in the inbox. Anyone have any ideas? Thank you in advance Link to comment Share on other sites More sharing options...
toonboon Posted May 15, 2009 Share Posted May 15, 2009 WinFlash()for flashing the window and try looking at _INetGetSource for the page source =) [right]~What can I say, I'm a Simplistic person[/right] Link to comment Share on other sites More sharing options...
Regency Posted May 16, 2009 Author Share Posted May 16, 2009 expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include<IE.au3> $oIE = ObjCreate("Shell.Explorer.2") $T = GUICreate("TMN Status Bar", 860, 30, _ (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2,$WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_EX_TOPMOST) $GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 884, 30) GUISetState(@SW_SHOWNOACTIVATE, $T) ;Show GUI $oIE.navigate("tmnx.net/authenticated/userinfo.aspx") Search() Func Search() $sImgToLookFor = "new_message_1.gif" ; Fill this in with whatever you're looking for $sImgToLookFor2 = "new_message_2.gif" ; Fill this in with whatever you're looking for $bImgIsThere = False $bImgIsThere2 = False $oImgs = _IEImgGetCollection($oIE) For $oImg In $oImgs If StringInStr($oImg.src, $sImgToLookFor) Then $bImgIsThere = True WinFlash("TMN Status Bar","") Search() ElseIf StringInStr($oImg.src, $sImgToLookFor2) Then $bImgIsThere2 = True WinFlash("TMN Status Bar","") Search() ElseIf $bImgIsThere = False Then Search() EndIf Next EndFunc While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete() C:\Program Files\AutoIt3\Include\IE.au3 (1150) : ==> The requested action with this object has failed.: SetExtended($oTemp.images.length) SetExtended($oTemp.images^ ERROR ->13:33:50 AutoIT3.exe ended.rc:1 +>13:33:50 AutoIt3Wrapper Finished >Exit code: 1 Time: 1.876 whats it mean? Link to comment Share on other sites More sharing options...
Regency Posted May 23, 2009 Author Share Posted May 23, 2009 anyone? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 23, 2009 Moderators Share Posted May 23, 2009 anyone?It tells you what it means. Means you tried to do something with an object call, with something that wasn't an object. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Regency Posted May 23, 2009 Author Share Posted May 23, 2009 i was actually talking about my original problem 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