Jump to content

Recommended Posts

Posted

Hi.
I have some light indicator in my cubic (Minecraft torch with addressed led strip and esp32).
I have read Teams status from some Team's log file and send command to torch by BT.
Some weeks before my IT updated my Teams to some new version and now there is no any log file with Teams status.
I found several solutions like MS Graph AP , or reading process details (to read status from process title) , but all this not  good solutions : MS Graph AP require Azure account/permissions/.. , since my Teams  corporative version - no chance, about reading the status from process title - works until I "close" Teams (it stays run and moves to system try) . I didn't find option to read menu or status from Teams when it in system try.

So , I think , maybe I can to read the icon of Teams from system try by AutoIt and from the icon to get color (changing with status) and by color to get the status.

How can I read icons from System Try ?


Thank you in advance.

 

 

Posted (edited)

Here is a start

Local $hTrayWnd = WinGetHandle("[CLASS:Shell_TrayWnd]")
Local $hTlb = ControlGetHandle($hTrayWnd, "", "ToolbarWindow324")
Local $aWPos = WinGetPos($hTrayWnd)
Local $aTPos = ControlGetPos($hTrayWnd, "", $hTlb)

ConsoleWrite($aWPos[0] + $aTPos[0] & "," & $aWPos[1] + $aTPos[1] & "," & $aWPos[0] + $aTPos[0] + $aTPos[2] & "," & $aWPos[1] + $aTPos[1]  + $aTPos[3] & @CRLF)

; Find a blue pixel from the autoit icon
Local $aCoord = PixelSearch($aWPos[0] + $aTPos[0], $aWPos[1] + $aTPos[1], $aWPos[0] + $aTPos[0] + $aTPos[2], $aWPos[1] + $aTPos[1]  + $aTPos[3], 0x5D83AC)
If Not @error Then
    ConsoleWrite("X and Y are: " & $aCoord[0] & "," & $aCoord[1])
    MouseMove($aCoord[0], $aCoord[1], 1) ; * <-- for debugging purposes only
EndIf

Sleep(5000)

 

Edited by ioa747

I know that I know nothing

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