Sign in to follow this  
Followers 0
venom_only

EyeBeam CLASS Detection

11 posts in this topic

#1 ·  Posted

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

Share this post


Link to post
Share on other sites



#2 ·  Posted

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


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted

i thought that too but no hidden nor visible text.  : ( 

Share this post


Link to post
Share on other sites

#4 ·  Posted

How about this?

1. Using WinList to get an array of windows of class "Funky Window"

2. Process the array and find the window without a title

3. Use that window's hWnd in subsequent code

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#6 ·  Posted

thanks for replays .

but did nt show anything. about "Funky window"
but show some info abount sniffing tool : ) and internet explorer. 

also uploading screenshot from Au3Info

Capture22334343.PNG

Capture1234.PNG

Share this post


Link to post
Share on other sites

#7 ·  Posted

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

 

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#9 ·  Posted

@venom_only Did you try detecting the window using WinList as I previously suggested?

Share this post


Link to post
Share on other sites

#10 ·  Posted

yea. nothing. only shows main window of the EyeBeam program itself. 

 

Capture445.PNG

Share this post


Link to post
Share on other sites

#11 ·  Posted

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.

1 person likes this

√-1 2^3 ∑ π, and it was delicious!

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  
Followers 0