Jump to content

EyeBeam CLASS Detection


Recommended Posts

hello. i need your help. 

im using this voip sip program named EyeBeam 

so problem is that i can detect the name of the program itself but i need autoit to detect that little square window during call.

i need to detect when that call window appears at the bottom. and then autoit will redirect or Hold that call.

 

when i try to detect  CLASS:funky window usig this 

 

Local $hWnd = WinWait("[CLASS:Funky Window]", "", 10)
    Local $aClientSize = WinGetClientSize($hWnd)
    MsgBox($MB_SYSTEMMODAL, "", "Width: " & $aClientSize[0] & @CRLF & "Height: " & $aClientSize[1])

autoit detecting the main window of the program not the little call class at the bottom. 

any suggestions ? welcomed

Capture11123.PNG

Link to comment
Share on other sites

  • Moderators

Does the small "funky window" have unique text you can key in on (second parameter in winwait)?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

See what this does when the call starts

#include <WinAPI.au3>
#include <GUIConstants.au3>
#include <WinAPISys.au3>

AutoItSetOption("GUIOnEventMode", 1)
AutoItSetOption("GUICloseOnESC", 0)
AutoItSetOption("MustDeclareVars", 1)

Global $hMain = GUICreate("Test", 420, 220)
Global $edtConsole = GUICtrlCreateEdit("", 10, 10, 400, 200, BitOR($ES_READONLY, $ES_WANTRETURN, $WS_VSCROLL, $ES_AUTOVSCROLL))
Global $trToggleGui = Null

GUICtrlSetColor($edtConsole, 0xF1F1F1)
GUICtrlSetBkColor($edtConsole, 0x1F1F1F)
GUICtrlSetFont($edtConsole, 11, 400, "", "Consolas")

GUISetOnEvent($GUI_EVENT_CLOSE, Close)
GUISetState(@SW_SHOW, $hMain)

GUIRegisterMsg(_WinAPI_RegisterWindowMessage("SHELLHOOK"), WM_SHELLHOOK)
_WinAPI_RegisterShellHookWindow($hMain)

OnAutoItExitRegister(OnAutoItExit)

While (True)
    Sleep(100)
WEnd

Func Close()
    Exit (0)
EndFunc   ;==>Close

Func OnAutoItExit()
    _WinAPI_DeregisterShellHookWindow($hMain)
EndFunc   ;==>OnAutoItExit

Func WM_SHELLHOOK($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam, $lParam
    If ($wParam = $HSHELL_WINDOWCREATED) Then
        GUICtrlSetData($edtConsole, GUICtrlRead($edtConsole) & 'Created: ' & @CRLF & _
                    @TAB & 'Title: ' & WinGetTitle($lParam) & @CRLF & _
                    @TAB & 'PID: ' & WinGetProcess($lParam) & @CRLF & _
                    @TAB & 'ClassName: ' & _WinAPI_GetClassName($lParam) & @CRLF) ; This will be the handle of the window closed.
    EndIf
EndFunc   ;==>WM_SHELLHOOK

Might be able to recognize the window on creation and do whatever you want with it.

Edited by InunoTaishou
Link to comment
Share on other sites

Okay, next step. Let's try everything :)

#include <WinAPI.au3>
#include <GUIConstants.au3>
#include <WinAPISys.au3>
#include <GuiEdit.au3>

AutoItSetOption("GUIOnEventMode", 1)
AutoItSetOption("GUICloseOnESC", 0)
AutoItSetOption("MustDeclareVars", 1)

Global $hMain = GUICreate("Test", 620, 320)
Global $edtConsole = GUICtrlCreateEdit("", 10, 10, 600, 300, BitOR($ES_READONLY, $ES_WANTRETURN, $WS_VSCROLL, $ES_AUTOVSCROLL))
Global $hEdit = GUICtrlGetHandle($edtConsole)
Global $aShell[$HSHELL_FLASH + 1]

$aShell[$HSHELL_WINDOWCREATED] = "HSHELL_WINDOWCREATED"
$aShell[$HSHELL_WINDOWDESTROYED] = "HSHELL_WINDOWDESTROYED"
$aShell[$HSHELL_ACTIVATESHELLWINDOW] = "HSHELL_ACTIVATESHELLWINDOW"
$aShell[$HSHELL_WINDOWACTIVATED] = "HSHELL_WINDOWACTIVATED"
$aShell[$HSHELL_GETMINRECT] = "HSHELL_GETMINRECT"
$aShell[$HSHELL_REDRAW] = "HSHELL_REDRAW"
$aShell[$HSHELL_TASKMAN] = "HSHELL_TASKMAN"
$aShell[$HSHELL_LANGUAGE] = "HSHELL_LANGUAGE"
$aShell[$HSHELL_SYSMENU] = "HSHELL_SYSMENU"
$aShell[$HSHELL_ENDTASK] = "HSHELL_ENDTASK"
$aShell[$HSHELL_ACCESSIBILITYSTATE] = "HSHELL_ACCESSIBILITYSTATE"
$aShell[$HSHELL_APPCOMMAND] = "HSHELL_APPCOMMAND"
$aShell[$HSHELL_WINDOWREPLACED] = "HSHELL_WINDOWREPLACED"
$aShell[$HSHELL_WINDOWREPLACING] = "HSHELL_WINDOWREPLACING"
$aShell[$HSHELL_RUDEAPPACTIVATED] = "HSHELL_RUDEAPPACTIVATED"
$aShell[$HSHELL_FLASH] = "HSHELL_FLASH"

GUICtrlSetColor($edtConsole, 0xF1F1F1)
GUICtrlSetBkColor($edtConsole, 0x1F1F1F)
GUICtrlSetFont($edtConsole, 11, 400, "", "Consolas")

GUISetOnEvent($GUI_EVENT_CLOSE, Close)
GUISetState(@SW_SHOW, $hMain)

GUIRegisterMsg(_WinAPI_RegisterWindowMessage("SHELLHOOK"), WM_SHELLHOOK)
_WinAPI_RegisterShellHookWindow($hMain)

OnAutoItExitRegister(OnAutoItExit)

While (True)
    Sleep(100)
WEnd

Func Close()
    Exit (0)
EndFunc   ;==>Close

Func OnAutoItExit()
    _WinAPI_DeregisterShellHookWindow($hMain)
EndFunc   ;==>OnAutoItExit

Func WM_SHELLHOOK($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam, $lParam

    GUICtrlSetData($edtConsole, GUICtrlRead($edtConsole) & 'Shell Command: ' & ($aShell[$wParam] ? $aShell[$wParam] : "Unknown Command (" & Int($wParam) & ")") & @CRLF & _
            @TAB & 'hWnd: ' & $lParam & @CRLF & _
            @TAB & 'Title: ' & WinGetTitle($lParam) & @CRLF & _
            @TAB & 'PID: ' & WinGetProcess($lParam) & @CRLF & _
            @TAB & 'ClassName: ' & _WinAPI_GetClassName($lParam) & @CRLF & @CRLF)
    _GUICtrlEdit_Scroll($hEdit, 4)
EndFunc   ;==>WM_SHELLHOOK

 

Link to comment
Share on other sites

yea nice try :) but 

 

Shell Command: HSHELL_WINDOWACTIVATED
    hWnd: 0x00020310
    Title: eyeBeam
    PID: 5140
    ClassName: Funky Window

Shell Command: HSHELL_WINDOWACTIVATED
    hWnd: 0x002804C2
    Title: Test
    PID: 4252
    ClassName: AutoIt v3 GUI

its detecting only main window of the program : ) the during call program still does not show anywhere.  its part of the main program and probably working as popup without window title. im thinking another way of detecting it. maybe desktop corner color chainging or somthing. 

 

111.png

Edited by venom_only
Link to comment
Share on other sites

  • Moderators

Have a look at the IUIAutomation thread in the examples forum. I know it can detect a lot more than the native Window Info tool.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

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