Jump to content

Recommended Posts

Posted

in case you want to check the color of the icon, i think use can use

PixelGetColor ( x , y )

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Posted (edited)

realkiller

Hi!

I found(?) solution, howsoever, there was work fine for me :). I testing this script on a Daemon Tools icon, this icon have a 2 state: with emulation and without emulation, green color and red color Posted Image Posted Image. If icon changed color from green to red, then appear warning MsgBox.

#include <WinAPI.au3>
#include <GuiToolBar.au3>

Dim $OnColor = 0x008000 ;green color in hex value
Dim $ID

$hWnd = _WinAPI_FindWindow("Shell_TrayWnd", "")
$hParent = ControlGetHandle($hWnd, "", "TrayNotifyWnd1")
$hToolBar = ControlGetHandle($hParent, "", "ToolbarWindow321")

$count = _GUICtrlToolbar_ButtonCount($hToolBar) - 1

For $i = 0 To $count
    $ID = _GUICtrlToolbar_IndexToCommand($hToolBar, $i)
    $GetText = _GUICtrlToolbar_GetButtonText($hToolBar, $ID)
    
    If StringInStr($GetText, "DAEMON") Then
        $aRect = _GUICtrlToolbar_GetButtonRect($hToolBar, $ID)
        ExitLoop
    EndIf
Next

$aPos = WinGetPos($hToolBar)

$Color = PixelGetColor($aPos[0] + $aRect[0] + 1, $aPos[1] + 2)
ConsoleWrite("0x" & Hex($Color, 6) & @LF)

If $Color <> $OnColor Then MsgBox(48, "Warning", "Icon color changed")
:)

Edit: you will be able to get text from icon when mouse cursor hovered on icon, enough substring.

Edited by rasim
Posted

thx for replying do you got the WinAPI.au3 for me i don't have installed the Auto3Lib

Just install last stabil AutoIt version 3.2.10.0

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