Jump to content
Sign in to follow this  
DalkiaKaye

MouseOver Tray

Recommended Posts

DalkiaKaye

I would like to create a little tool that displays as an icon in the tray, and when users go over with the mouse (or click is OK too :P) they receive the text that is printed in it (Ip address and hostname).

Is there a function which does this ?

Share this post


Link to post
Share on other sites
rasim

DalkiaKaye

Welcome! :P

Example:

#include <Constants.au3>

Opt("TrayMenuMode", 1)

TraySetClick(16)
TraySetToolTip("IP-Adress: " & @IPAddress1 & @LF & _
               "Localhost: 127.0.0.1")

$ExitItem = TrayCreateItem("Exit")

While 1
    $tMsg = TrayGetMsg()
    Switch $tMsg
        Case $TRAY_EVENT_PRIMARYUP
            MsgBox(64, "Info", "IP-Adress: " & @IPAddress1 & @LF & _
                    "Localhost: 127.0.0.1")
        Case $ExitItem
            Exit
    EndSwitch
WEnd

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  

×