Jump to content
Sign in to follow this  
Qvintus

Teamviewer Extract Participants List

Recommended Posts

Hello AutoIT'ers

Me and my friend are using AutoIT as for controlling our Laptop connected up to a TV through Teamviewer.

So far I've made my script hide/unhide and start a meeting if none is active.

However we've run into a problem when we wanted to have the script let us give control rights.

I know how to send the ControlClick command but problem is hitting the right person....

I've tried to use ControlListView and tried to find text to that particular class when the meeting is ongoing,

however I just can't seem to extract the right information.

Anyone know a good way to some how extract the list of Participants in Teamviewer Meeting?

It would be much appreciated!

EDIT: Some screenshot of the scripts so you might get a general understanding

QmBc.PNG

ControlInfo from Participants box:

sJKW.PNG

Best Regards Qvintus

Edited by Qvintus

Share this post


Link to post
Share on other sites

It's possible that's a window within a window?

Try this out, to see if you can grab (possible) nested controls

$hControl = ControlGetHandle("your window", "", "TVScrollWin1")
ConsoleWrite(WinGetClassList($hControl) & @CRLF)

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

 

It's possible that's a window within a window?

Try this out, to see if you can grab (possible) nested controls

$hControl = ControlGetHandle("your window", "", "TVScrollWin1")
ConsoleWrite(WinGetClassList($hControl) & @CRLF)

 

Thanks a lot for the answer!

Sadly that return nothin' even though it would seem a button + more is part of that object.

I've tried

$hControl = ControlGetHandle("[CLASS:TV_ControlWin]", "", "TVScrollWin1")
ConsoleWrite(WinGetClassList($hControl) & @CRLF)
$hControl = ControlGetHandle("[CLASS:TV_ControlWin]", "", "[CLASS:TVScrollWin;INSTANCE:1]")
ConsoleWrite(WinGetClassList($hControl) & @CRLF)

However for some reason if I use this:

$hControl = ControlGetHandle("[CLASS:TV_ControlWin]", "", "[CLASS:TVScrollWin1]")
ConsoleWrite(WinGetClassList($hControl) & @CRLF)

It returns this list:

SciTEWindowContent
Scintilla
Scintilla
ToolbarWindow32
SciTeTabCtrl
SciTEWindowContent
Static
Edit
Button
SciTEWindowContent
Static
ComboBox
Edit
Button
Button
Button
Button
Button
Button
Button
Button
SciTEWindowContent
Static
ComboBox
Edit
Static
ComboBox
Edit
Button
Button
Button
Button
Button
Button
Button
Button
Button
msctls_statusbar32

 

Tried getting info from all Edit instances, however nothin' of use turned up.
Edited by Qvintus

Share this post


Link to post
Share on other sites

Yes, that's because the last one returns an invalid handle (""), which inside the WinGetClassList returns the class list of your active window (which was scite)

ControlGetHandle

Success: Returns the handle (HWND) value.

Failure: Returns "" (blank string) and sets @error to 1 if no window matches the criteria.

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Yes, that's because the last one returns an invalid handle (""), which inside the WinGetClassList returns the class list of your active window (which was scite)

ControlGetHandle

Success: Returns the handle (HWND) value.

Failure: Returns "" (blank string) and sets @error to 1 if no window matches the criteria.

 

I see... Guess I'll be needing to get hardcore to sort this out then? :(

Share this post


Link to post
Share on other sites

try this out, you might get lucky:

#include <Array.au3>
#include <constants.au3>
#include <WinAPI.au3>

$hwnd = WinGetHandle("[CLASS:TV_ControlWin]")
If IsHWnd($hwnd) Then
    Var_GetAllWindowsControls($hwnd)
Else
    MsgBox(1,1,"can't find your window...try again with correct class")
EndIf

Exit
Func Var_GetAllWindowsControls($hCallersWindow)
;~  $giSubFunctionCounter += 1
    ; Get all list of controls
    $sClassList = WinGetClassList($hCallersWindow)
    ; Create array
    $aClassList = StringSplit($sClassList, @CRLF, 2)

    ; Sort array
    _ArraySort($aClassList)
    _ArrayDelete($aClassList, 0)

    ; Loop
    $iCurrentClass = ""
    $iCurrentCount = 1
    $iTotalCounter = 1

    For $i = 0 To UBound($aClassList) - 1
        If $aClassList[$i] = $iCurrentClass Then
            $iCurrentCount += 1
        Else
            $iCurrentClass = $aClassList[$i]
            $iCurrentCount = 1
        EndIf

        $hControl = ControlGetHandle($hCallersWindow, "", "[CLASSNN:" & $iCurrentClass & $iCurrentCount & "]")
        $text = StringRegExpReplace(ControlGetText($hCallersWindow, "", $hControl), "[\n\r]", "{@CRLF}")
        $aPos = ControlGetPos($hCallersWindow, "", $hControl)
        $sControlID = _WinAPI_GetDlgCtrlID($hControl)

        If IsArray($aPos) Then
            ConsoleWrite("Func=[Var_GetAllWindowsControls]: ControlCounter=[" & $iTotalCounter & "] ControlID=[" & $sControlID & "] Handle=[" & $hControl & "] ClassNN=[" & $iCurrentClass & $iCurrentCount & "] XPos=[" & $aPos[0] & "] YPos=[" & $aPos[1] & "] Width=[" & $aPos[2] & "] Height=[" & $aPos[3] & "] Text=[" & $text & "]." & @CRLF)
        EndIf
        If Not WinExists($hCallersWindow) Then ExitLoop
        $iTotalCounter += 1
    Next

EndFunc   ;==>Var_GetAllWindowsControls
Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

 

try this out, you might get lucky:

#include <Array.au3>
#include <constants.au3>
#include <WinAPI.au3>

$hwnd = WinGetHandle("[CLASS:TV_ControlWin]")
If IsHWnd($hwnd) Then
    Var_GetAllWindowsControls($hwnd)
Else
    MsgBox(1,1,"can't find your window...try again with correct class")
EndIf

Exit
Func Var_GetAllWindowsControls($hCallersWindow)
;~  $giSubFunctionCounter += 1
    ; Get all list of controls
    $sClassList = WinGetClassList($hCallersWindow)
    ; Create array
    $aClassList = StringSplit($sClassList, @CRLF, 2)

    ; Sort array
    _ArraySort($aClassList)
    _ArrayDelete($aClassList, 0)

    ; Loop
    $iCurrentClass = ""
    $iCurrentCount = 1
    $iTotalCounter = 1

    For $i = 0 To UBound($aClassList) - 1
        If $aClassList[$i] = $iCurrentClass Then
            $iCurrentCount += 1
        Else
            $iCurrentClass = $aClassList[$i]
            $iCurrentCount = 1
        EndIf

        $hControl = ControlGetHandle($hCallersWindow, "", "[CLASSNN:" & $iCurrentClass & $iCurrentCount & "]")
        $text = StringRegExpReplace(ControlGetText($hCallersWindow, "", $hControl), "[\n\r]", "{@CRLF}")
        $aPos = ControlGetPos($hCallersWindow, "", $hControl)
        $sControlID = _WinAPI_GetDlgCtrlID($hControl)

        If IsArray($aPos) Then
            ConsoleWrite("Func=[Var_GetAllWindowsControls]: ControlCounter=[" & $iTotalCounter & "] ControlID=[" & $sControlID & "] Handle=[" & $hControl & "] ClassNN=[" & $iCurrentClass & $iCurrentCount & "] XPos=[" & $aPos[0] & "] YPos=[" & $aPos[1] & "] Width=[" & $aPos[2] & "] Height=[" & $aPos[3] & "] Text=[" & $text & "]." & @CRLF)
        EndIf
        If Not WinExists($hCallersWindow) Then ExitLoop
        $iTotalCounter += 1
    Next

EndFunc   ;==>Var_GetAllWindowsControls

 

Sadly no info I didn't have already :(

I appreciate your help greatly though, you've given me a great amount of ideas in getting info for future projects ^^

Anything else is welcome ofc! xD

Edit: Info I got out of it even though I doubt it will provide any useful info

Func=[Var_GetAllWindowsControls]: ControlCounter=[1] ControlID=[888] Handle=[0x003148E6] ClassNN=[ATL:01D1C6A81] XPos=[30] YPos=[91] Width=[0] Height=[0] Text=[].
Func=[Var_GetAllWindowsControls]: ControlCounter=[2] ControlID=[68902512] Handle=[0x00661750] ClassNN=[ATL:01D376501] XPos=[30] YPos=[516] Width=[245] Height=[183] Text=[Please wait...].
Func=[Var_GetAllWindowsControls]: ControlCounter=[3] ControlID=[68902152] Handle=[0x002E25C8] ClassNN=[ATL:01D376502] XPos=[270] YPos=[866] Width=[180] Height=[135] Text=[Please wait...].
Func=[Var_GetAllWindowsControls]: ControlCounter=[4] ControlID=[187730544] Handle=[0x002827CA] ClassNN=[ATL:01D39E501] XPos=[30] YPos=[516] Width=[245] Height=[183] Text=[].
Func=[Var_GetAllWindowsControls]: ControlCounter=[5] ControlID=[187730256] Handle=[0x001726A8] ClassNN=[ATL:01D39E502] XPos=[269] YPos=[865] Width=[182] Height=[165] Text=[].
Func=[Var_GetAllWindowsControls]: ControlCounter=[6] ControlID=[126409848] Handle=[0x00242594] ClassNN=[ATL:01D3FBF81] XPos=[30] YPos=[291] Width=[245] Height=[153] Text=[].
Func=[Var_GetAllWindowsControls]: ControlCounter=[7] ControlID=[10] Handle=[0x0035280A] ClassNN=[Edit1] XPos=[113] YPos=[124] Width=[162] Height=[20] Text=[m65-284-087].
Func=[Var_GetAllWindowsControls]: ControlCounter=[8] ControlID=[11] Handle=[0x002F2432] ClassNN=[Edit2] XPos=[30] YPos=[91] Width=[0] Height=[0] Text=[Password].
Func=[Var_GetAllWindowsControls]: ControlCounter=[9] ControlID=[666] Handle=[0x002C2722] ClassNN=[Static1] XPos=[30] YPos=[516] Width=[245] Height=[183] Text=[].
Func=[Var_GetAllWindowsControls]: ControlCounter=[10] ControlID=[69337900] Handle=[0x00281D98] ClassNN=[TVScrollWin1] XPos=[30] YPos=[152] Width=[245] Height=[19] Text=[].
Func=[Var_GetAllWindowsControls]: ControlCounter=[11] ControlID=[129859248] Handle=[0x00172342] ClassNN=[TVScrollWin2] XPos=[30] YPos=[516] Width=[245] Height=[183] Text=[].
Func=[Var_GetAllWindowsControls]: ControlCounter=[12] ControlID=[129858080] Handle=[0x00670E4C] ClassNN=[TVScrollWin3] XPos=[30] YPos=[861] Width=[660] Height=[135] Text=[].
Func=[Var_GetAllWindowsControls]: ControlCounter=[13] ControlID=[129858664] Handle=[0x009223AA] ClassNN=[TVScrollWin4] XPos=[30] YPos=[516] Width=[660] Height=[456] Text=[].
Func=[Var_GetAllWindowsControls]: ControlCounter=[14] ControlID=[69337060] Handle=[0x005125B2] ClassNN=[TVWidget1] XPos=[30] YPos=[91] Width=[245] Height=[110] Text=[].
Func=[Var_GetAllWindowsControls]: ControlCounter=[15] ControlID=[126498868] Handle=[0x001B286A] ClassNN=[TVWidget2] XPos=[30] YPos=[201] Width=[245] Height=[24] Text=[].
Func=[Var_GetAllWindowsControls]: ControlCounter=[16] ControlID=[126409204] Handle=[0x001D494A] ClassNN=[TVWidget3] XPos=[30] YPos=[225] Width=[245] Height=[219] Text=[].
Func=[Var_GetAllWindowsControls]: ControlCounter=[17] ControlID=[126435828] Handle=[0x002E27DE] ClassNN=[TVWidget4] XPos=[30] YPos=[444] Width=[245] Height=[24] Text=[].
Func=[Var_GetAllWindowsControls]: ControlCounter=[18] ControlID=[126511260] Handle=[0x002122BC] ClassNN=[TVWidget5] XPos=[30] YPos=[468] Width=[245] Height=[24] Text=[].
Func=[Var_GetAllWindowsControls]: ControlCounter=[19] ControlID=[126523052] Handle=[0x00211AF4] ClassNN=[TVWidget6] XPos=[30] YPos=[492] Width=[245] Height=[24] Text=[].
Func=[Var_GetAllWindowsControls]: ControlCounter=[20] ControlID=[127766740] Handle=[0x0051076C] ClassNN=[TVWidget7] XPos=[30] YPos=[516] Width=[245] Height=[24] Text=[].

Edited by Qvintus

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Colduction
      Hi dear friends!, i'm sorry for creating a new thread (a new problem), i have over than 9 lists that i want to combine them to be this (in this example, there are 3 test files):


      I've written a little code for splitting main information, but i really confused how to make results as "Output.txt", here is that code:
       
      $sRegex_1 = StringRegExp(FileRead("1.txt"), '(?s:(?<=\=\=\r\n)(.*?)(?=\r\n\=\=))', 3) $sRegex_2 = StringRegExp(FileRead("2.txt"), '(?s:(?<=\=\=\r\n)(.*?)(?=\r\n\=\=))', 3) $sRegex_3 = StringRegExp(FileRead("3.txt"), '(?s:(?<=\=\=\r\n)(.*?)(?=\r\n\=\=))', 3) For $i = 0 To UBound($sRegex_1) - 1 ConsoleWrite($sRegex_1[$i] & @CRLF) For $j = 0 To UBound($sRegex_2) - 1 ConsoleWrite($sRegex_2[$j] & @CRLF) For $k = 0 To UBound($sRegex_3) - 1 ConsoleWrite($sRegex_3[$k] & @CRLF) Next Next Next  
    • By Colduction
      Hi guys!, i have a problem to convert Python code to AutoIt code, in fact i had not coded with Python yet!, this code is about permutation a string's case, i will be happy with your comments :)❤;

      Python code:
       
      # Python code to print all permutations # with respect to cases # Function to generate permutations def permute(inp): n = len(inp) # Number of permutations is 2^n mx = 1 << n # Converting string to lower case inp = inp.lower() # Using all subsequences and permuting them for i in range(mx): # If j-th bit is set, we convert it to upper case combination = [k for k in inp] for j in range(n): if (((i >> j) & 1) == 1): combination[j] = inp[j].upper() temp = "" # Printing current combination for i in combination: temp += i print(temp), # Driver code permute("Hello") # This code is contributed by Sachin Bisht
      My code in AutoIt:
      ; https://www.geeksforgeeks.org/permute-string-changing-case/ _PermuteCase("ABC") Func _PermuteCase($sText) If StringRegExp($sText, "^[A-Za-z]{1,}$") Then Local $iLength = StringLen($sText) ; Get length of the text. Local $iMaxPerm = 2 ^ $iLength ; Number of permutations is 2^n Local $sLow_Text = StringLower($sText) ; Converting string to lower case Local $asChrs = StringToASCIIArray($sLow_Text) ; Split the text into array of chars. For $i = 1 To $iMaxPerm Step 1 For $j = 0 To $asChrs[0] ;................................................... Next Next Else Return SetError(-1, 0, "Error: Input is incorrect!") EndIf EndFunc ;==>_PermuteCase  
       
       
       
       
       
      ====================== SOLUTION by @TheXman ======================
       
    • By TheAutomator
      I'm working on a script that needs to work with a huge database inside a combobox.
      I'm looking for the best way to link a multidimensional array to that data to load that data on to textfields.

      example:
      combo item 0 = "A", data = [index linked to combo item 0] [1,0,5,4,87,9,"xyz"]
      combo item 1 = "B", data = [index linked to combo item 1] [1,6,5,4,87,9,"zzz"]
      combo item 3 = "A", data = [index linked to combo item 3] [1,6,4,4,87,9,"aaa"] ; yes also double items!
      Would also like to be able to delete and add items on the fly btw..
      Local $INDEX[0][10] ; ubound wil be resized like a stack while loading from a textfile ;inside gui: local $Combo = GUICtrlCreateCombo('...', 10, 10, 290, 25) ;gui loop: While True Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Combo display() ; how do i link my array index to the combo labels to know what to show in the textfields? ; NOTE: (there are duplicate items in the combobox!) EndSwitch WEnd Any toughs are welcome.
      I was thinking about using _GUICtrlComboBox_GetCurSel($Combo) and use that integer to refer to the index (dimension 1) of the array 
      Thanks, TheAutomator
       
    • By nacerbaaziz
      good morning all.
      first lit me give you all a thinks to your help
      you're help me allot thank you all.
      sirs today i've a new problem
      it's not a problem but thing i want to add it to blind accessability.
      the ListBox can send a notification when the user send a double click on it items
      but as we know that the blind users can't use the mouse for that they use the keybord to navigate.
      as we know that the enter replace the double click on the keybord
      for that i need when the user send a inter above any listBox item the list send a double click notification.
      i know some of you tell me that i can use the  GUISetAccelerators function
      but the enter has a other tasks such as leav a blanc line on edits and activate the defaultButton and other tasks.
      that what i need and i hope that you can help me
      this is a simple example.
      #include <GUIConstantsEx.au3> #include <StructureConstants.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <ListBoxConstants.au3> Example() Func Example() Local $sMESSAGE = "The following buttons have been clicked" GUICreate("My GUI list") ; will create a dialog box that when displayed is centered Local $idButton_Add = GUICtrlCreateButton("Add", 64, 32, 75, 25) Local $idButton_Clear = GUICtrlCreateButton("Clear", 64, 72, 75, 25) global $idMylist = GUICtrlCreateList("buttons that have been clicked", 176, 32, 121, 97) GUICtrlSetLimit(-1, 200) ; to limit horizontal scrolling GUICtrlSetData(-1, $sMESSAGE) global $DummyList = GUICtrlCreateDummy() GUICtrlSendToDummy($DummyList, 1) Local $idButton_Close = GUICtrlCreateButton("my closing button", 64, 160, 175, 25) GUIRegisterMsg($WM_command, "WM_command") GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idButton_Add GUICtrlSetData($idMylist, "You clicked button No1|") Case $idButton_Clear GUICtrlSetData($idMylist, "") Case $idButton_Close MsgBox($MB_SYSTEMMODAL, "", "the closing button has been clicked", 2) Exit case $DummyList $g_iTemp = GUICtrlRead($DummyList) if $g_iTemp = $LBN_DBLCLK then ;$LBN_DBLCLK then msgBox(64, "", "") endIf GUICtrlSendToDummy($DummyList, 0) EndSwitch WEnd EndFunc ;==>Example Func WM_command($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = $lParam $iCode = BitShift($wParam, 16) ; Hi Word Switch $hWndFrom Case GUICtrlGetHandle($idMylist) Switch $iCode Case $LBN_SELCHANGE, $LBN_DBLCLK, $LBN_SELCANCEL, $LBN_SETFOCUS GUICtrlSendToDummy($DummyList, $iCode) case else ;GUICtrlSendToDummy($DummyTreeview, 1) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc  
    • By Ascer
      1. Description.
      Udf working with MSDN System.Collections.ArrayList. Allow you to make fast operations on huge arrays, speed is even x10 better than basic _ArrayAdd.  Not prefered for small arrays < 600 items. 2. Requirements
      .NET Framework 1.1 - 4.5 (on this version Microsoft destroy old rules) System Windows 3. Possibilities.
      ;=============================================================================================================== ; UDF Name: List.au3 ; ; Date: 2018-02-17, 10:52 ; Description: Simple udf to create System Collections as ArrayList and make multiple actions on them. ; ; Function(s): _ListCreate -> Creates a new list ; _ListCapacity -> Gets a list size in bytes ; _ListCount -> Gets items count in list ; _ListIsFixedSize -> Get bool if list if fixed size ; _ListIsReadOnly -> Get bool if list is read only ; _ListIsSynchronized -> Get bool if list is synchronized ; _ListGetItem -> Get item on index ; _ListSetItem -> Set item on index ; ; _ListAdd -> Add item at end of list ; _ListClear -> Remove all list items ; _ListClone -> Duplicate list in new var ; _ListContains -> Get bool if item is in list ; _ListGetHashCode -> Get hash code for list ; _ListGetRange -> Get list with items between indexs ; _ListIndexOf -> Get index of item ; _ListInsert -> Insert a new item on index ; _ListInsertRange -> Insert list into list on index ; _ListLastIndexOf -> Get index last of item ; _ListRemove -> Remove first found item ; _ListRemoveAt -> Remove item in index ; _ListRemoveRange -> Remove items between indexs ; _ListReverse -> Reverse all items in list ; _ListSetRange -> Set new value for items in range ; _ListSort -> Sort items in list (speed of reading) ; _ListToString -> Get list object name ; _ListTrimToSize -> Remove unused space in list ; ; Author(s): Ascer ;=============================================================================================================== 4. Downloads
      List.au3 5. Examples
      SpeedTest _ArrayAdd vs ListAdd SpeedTest ArraySearch vs ListIndexOf Basic usage - crating guild with members  
×
×
  • Create New...