Jump to content

Recommended Posts

Posted (edited)

Use ToolTip

#NoTrayIcon
#cs===============Info====================
Createdate:15/AUG/2011
Name:IpPackSetMouseCursor
Discript:Show ip package number with mouse
Design:sak2005
#ce=======================================
Opt("TrayMenuMode",1)
Opt("TrayOnEventMode",1)
Global $sURL = 'www.google.com'
_main()
Func _main()
If @IPAddress1 = '127.0.0.1'Then
        MsgBox(64, "", "Pleased First Connections")
        Exit
    Else
        Local $about = TrayCreateItem("About")
        TrayItemSetOnEvent($about,"_About")
        TrayCreateItem("")
        Local $exit = TrayCreateItem("Exit")
        TrayItemSetOnEvent($exit,"_ExitApp")
        TraySetState()
        TraySetIcon("shell32.dll", -47)
        TraySetToolTip("Exit")
        Do
            Local $iPing = Ping($sURL, 4000)
            Switch $iPing
                Case 0
                    ToolTip('ONLINE'&@CRLF&'No, signal')
                Case Else
                    ToolTip('ONLINE'&@CRLF&'Package = '&$iPing&'.ms')
            EndSwitch
                Sleep(10)
        Until @IPAddress1 = '127.0.0.1'
    EndIf
EndFunc

Func _About()
    MsgBox(64, "", "Create by:sak2005")
EndFunc

Func _ExitApp()
    Exit
EndFunc

===========================================================

Use GUI (For mobile net modem)

#NoTrayIcon
#cs============Info=================
Createdate:15/AUG/2011
Name:MobileNetMeter
Style:GUI glass
Discript:View Package ping indicate.
DesignBy:Sak2005
#ce=================================
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#Include <WinAPI.au3>

HotKeySet("{ESC}", "_hkExitApp")
Global $sURL='www.google.com'

$hWnd = GUICreate("Form1", 111, 58, 920, 670, _
BitOR($WS_MINIMIZEBOX,$WS_SYSMENU,$WS_POPUP,$WS_GROUP,$WS_CLIPSIBLINGS), _
BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE,$WS_EX_LAYERED))
GUISetBkColor(0xABABAB)
$Progress1 = GUICtrlCreateProgress(12, 36, 12, 12)
$Progress2 = GUICtrlCreateProgress(26, 28, 14, 20)
$Progress3 = GUICtrlCreateProgress(42, 24, 14, 25)
$Progress4 = GUICtrlCreateProgress(58, 16, 14, 33)
$Progress5 = GUICtrlCreateProgress(74, 8, 14, 41)
GUISetState(@SW_SHOW)

For $i = 0 To 255 Step 4
_WinAPI_SetLayeredWindowAttributes($hWnd, 0xABABAB, $i, BitOR($LWA_COLORKEY, $LWA_ALPHA))
Sleep(1)
Next
Do
    $iPing = Ping($sURL, 4000)
        Select
            Case $iPing = 0
                GUICtrlSetData($Progress1, 0)
                GUICtrlSetData($Progress2, 0)
                GUICtrlSetData($Progress3, 0)
                GUICtrlSetData($Progress4, 0)
                GUICtrlSetData($Progress5, 0)
            Case $iPing < 300
                GUICtrlSetData($Progress1, 100)
                GUICtrlSetData($Progress2, 100)
                GUICtrlSetData($Progress3, 0)
                GUICtrlSetData($Progress4, 0)
                GUICtrlSetData($Progress5, 0)
            Case $iPing < 400
                GUICtrlSetData($Progress1, 100)
                GUICtrlSetData($Progress2, 100)
                GUICtrlSetData($Progress3, 100)
                GUICtrlSetData($Progress4, 0)
                GUICtrlSetData($Progress5, 0)
            Case $iPing < 500
                GUICtrlSetData($Progress1, 100)
                GUICtrlSetData($Progress2, 100)
                GUICtrlSetData($Progress3, 100)
                GUICtrlSetData($Progress4, 100)
                GUICtrlSetData($Progress5, 0)
            Case $iPing < 600
                GUICtrlSetData($Progress1, 100)
                GUICtrlSetData($Progress2, 100)
                GUICtrlSetData($Progress3, 100)
                GUICtrlSetData($Progress4, 100)
                GUICtrlSetData($Progress5, 100)
        EndSelect
Until GUIGetMsg()=$GUI_EVENT_CLOSE

Func _hkExitApp()
    Exit
EndFunc
Edited by newsak2005

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...