Sign in to follow this  
Followers 0
Regency

2 problems with same script, GUI Interface..

5 posts in this topic

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 flsh 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.gif

and http://tmnx.net/images/new_message_2.gif

that link when there is 2 or more messages in the inbox.

Anyone have any ideas? Thank you in advance

Share this post


Link to post
Share on other sites



Umm., not really, as i want it to look like this, i just want more functionality out of it.. The gui is fine, now i need to work with it to do as i need, which i am stuck with being unable to figure out what to do...

Share this post


Link to post
Share on other sites

This:

<img style="border-width: 0px;" src="../images/no_messages.gif" id="imgMsg"/>

is probably changed to something else in the src attribute so you can check something like:

#include <IE.au3>

Local $oImg = _IEGetObjById($oIE, 'imgMsg')
If StringInStr($oImg.src, 'no_messages') Then
    ; No new messages.
Else
    ; New messages.
EndIf

Share this post


Link to post
Share on other sites

I looked into what you were thinking. But i dunno how to figure it in with it being a gui. :)

Anyone have a better way of writting this so i can add other options?

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