Jump to content

Recommended Posts

Looking to build a TreeView dynamically from an Array (Array built from excel sheet)

Have not made the excel sheet yet, so I'm open to suggestions on layout so as to make it easiest as possible to get it into a treeview.

Thinking each row could be a item to add with the columns defining the placement in the trees, Like:

Cells(1,1) = "Level 1 Parent Name"

Cells(1,2) = "Level 2 Parent Name"

Cells(1,3) = "Level 3 Parent Name"

Cells(1,4) = "Add this item"

Cells(1,5) = ""

When value = ""  then

     Create entire branch or any part of it that doesn't already exist.

advance to next row

For processing speed I'd probably want to work with an array, like:

$aExcelData = _ExcelReadSheetToArray($oExcel,2,1,$LastUsedRow,$LastUsedCol)

Can someone help me with the loop?  or maybe point to tool that may do this?

Share this post


Link to post
Share on other sites

I use the following example to create a treeview.

Func _AD_GetOUTreeView($sAD_OU, $hAD_TreeView)

    Local $sSeparator = "\", $aAD_Temp, $sAD_Line, $iAD_Level
    Local $aAD_OUs = _AD_GetAllOUs($sAD_OU, $sSeparator)
    If @error <> 0 Then Return SetError(@error, @extended, 0)
    Local $aAD_TreeView[$aAD_OUs[0][0] + 1][3] = [[$aAD_OUs[0][0], 3]]
    For $i = 1 To $aAD_OUs[0][0]
        $aAD_Temp = StringSplit($aAD_OUs[$i][0], $sSeparator)
        $aAD_TreeView[$i][0] = StringFormat("%" & $aAD_Temp[0] - 1 & "s", "") & "#" & $aAD_Temp[$aAD_Temp[0]]
        $aAD_TreeView[$i][1] = $aAD_OUs[$i][1]
    Next
    _GUICtrlTreeView_BeginUpdate($hAD_TreeView)
    Local $ahAD_Node[50]
    For $iAD_Index = 1 To $aAD_TreeView[0][0]
        $sAD_Line = StringSplit(StringStripCR($aAD_TreeView[$iAD_Index][0]), @TAB)
        $iAD_Level = StringInStr($sAD_Line[1], "#")
        If $iAD_Level = 0 Then ExitLoop
        If $iAD_Level = 1 Then
            $ahAD_Node[$iAD_Level] = _GUICtrlTreeView_Add($hAD_TreeView, 0, StringMid($sAD_Line[1], $iAD_Level + 1))
            $aAD_TreeView[$iAD_Index][2] = $ahAD_Node[$iAD_Level]
        Else
            $ahAD_Node[$iAD_Level] = _GUICtrlTreeView_AddChild($hAD_TreeView, $ahAD_Node[$iAD_Level - 1], StringMid($sAD_Line[1], $iAD_Level + 1))
            $aAD_TreeView[$iAD_Index][2] = $ahAD_Node[$iAD_Level]
        EndIf
    Next
    _GUICtrlTreeView_EndUpdate($hAD_TreeView)
    Return $aAD_TreeView

EndFunc   ;==>_AD_GetOUTreeView

The data to display starts after the "'#" sign.

The number of spaces before the "#" denotes the level in the treeview. The root has zero spaces, all entries on the first level one etc.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-03-02 - Version 1.3.5.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-13 - Version 0.5.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thanks water,

But, I'm very new and don't understand how to apply that solution.  Maybe some more basic building blocks would help me get this on my own.

For example:

if $x = "This Particular Existing TreeView Item String"

How do I search the tree for $x and return its location so I can add a child?

Share this post


Link to post
Share on other sites

My function creates the TreeView from an array in one go.

The array could look like this example:
 

"#Root"

" #Level1 - First entry"

"  #Level1.1 - First entry"

"   #Level1.1.1 - First entry"

"  #Level1.1 - Second entry"

"  #Level1.1 - Third entry"

" #Level1 - Second entry"

So you would need to create the entries in Excel top-down.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-03-02 - Version 1.3.5.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-13 - Version 0.5.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

I've stripped down the example. The data for the TreeView is stored in an array on line 42.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiTreeView.au3>
#include <Array.au3>

$iSelected = _TreeView()
Exit

Func _TreeView()
    Local $Msg, $hSelection
    Local $sTitle = "Treeview Test"
    Local $hGUI = GUICreate($sTitle, 743, 683, -1, -1)
    Local $hTree = GUICtrlCreateTreeView(6, 6, 600, 666, -1, $WS_EX_CLIENTEDGE)
    Local $bExit = GUICtrlCreateButton("Exit", 624, 8, 97, 33)
    Local $bExpand = GUICtrlCreateButton("Expand", 624, 56, 97, 33)
    Local $bCollapse = GUICtrlCreateButton("Collapse", 624, 104, 97, 33)
    Local $bSelect = GUICtrlCreateButton("Select", 624, 152, 97, 33)
    Local $aTreeView = _TV_Populate($hTree)
    GUISetState(@SW_SHOW)
    While 1
        $Msg = GUIGetMsg()
        Switch $Msg
            Case $GUI_EVENT_CLOSE, $bExit
                Exit
            Case $bExpand
                _GUICtrlTreeView_Expand($hTree)
            Case $bCollapse
                _GUICtrlTreeView_Expand($hTree, 0, False)
            Case $bSelect
                $hSelection = _GUICtrlTreeView_GetSelection($hTree)
                For $i = 1 To $aTreeView[0][0]
                    If $hSelection = $aTreeView[$i][2] Then ExitLoop
                Next
                Return $aTreeView[$i][1]
        EndSwitch
    WEnd
EndFunc   ;==>_TreeView

Func _TV_Populate($hTree)

    ; Test data
    Local $aTreeView[6][3] = [[5, 3], ["#Root", "ID1"], [" #Level1 Entry 1", "ID2"], [" #Level1 Entry 2", "ID3"], ["  #Level 2 Entry 1", "ID4"], [" #Level1 Entry 3", "ID5"]]
    _GUICtrlTreeView_BeginUpdate($hTree)
    Local $ahNode[50]
    For $iIndex = 1 To $aTreeView[0][0]
        $iLevel = StringInStr($aTreeView[$iIndex][0], "#")
        If $iLevel = 0 Then ExitLoop
        If $iLevel = 1 Then
            $ahNode[$iLevel] = _GUICtrlTreeView_Add($hTree, 0, StringMid($aTreeView[$iIndex][0], $iLevel + 1))
            $aTreeView[$iIndex][2] = $ahNode[$iLevel]
        Else
            $ahNode[$iLevel] = _GUICtrlTreeView_AddChild($hTree, $ahNode[$iLevel - 1], StringMid($aTreeView[$iIndex][0], $iLevel + 1))
            $aTreeView[$iIndex][2] = $ahNode[$iLevel]
        EndIf
    Next
    _GUICtrlTreeView_EndUpdate($hTree)
    Return $aTreeView

EndFunc   ;==>_TV_Populate

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-03-02 - Version 1.3.5.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-13 - Version 0.5.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

Jags,

Building on waters technique...

#include <array.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiTreeView.au3>

; arrays used to populate treeview controls
;
;  [0] - parent name ('0' is root level)
;  [1] - element name
;
; note - If the parent does not exist the element will be skipped.
;        If a child is named the same as a previous parent it cannot become a parent (see example in TreeView #2).

Local $aTV1[100][2] = [ _
        ['0', '01'], _
        ['0', '02'], _
        ['0', '03'], _
        ['0', '04'], _
        ['0', '05'], _
        ['01', '01-01'], _
        ['01', '01-02'], _
        ['03', '03-01'], _
        ['03', '03-02'], _
        ['03', '03-03'], _
        ['04', '04-01'], _
        ['01', '01-03'], _
        ['01', '01-04'], _
        ['0', '06'], _
        ['04-01', '04-01-01'], _
        ['04-01', '04-01-02'], _
        ['04-01-02', '04-01-02-01'], _
        ['09', '09-01'], _
        ['01-03', '01-03-01'], _
        ['01-03-01', '01-03-01-01'], _
        ['01-03-01', '01-03-01-02'], _
        ['01-03-01', '01-03-01-03'], _
        ['01-03-01-02', '01-03-01-02-01'], _
        ['04', '04-02'] _
        ]

local $aTV2[100][2] = [ _
        ['0','AA'], _
        ['0','Aa'], _
        ['0','BB'], _
        ['0','bb'], _
        ['AA','AA-01'], _
        ['AA','AA-02'], _
        ['BB','BB-01'], _
        ['bb','bb-01'], _
        ['Aa','Aa-01'], _
        ['bb','bb-02'], _
        ['bb-01','bb-01-01'], _
        ['bb-01','bb-01-02'], _
        ['bb-01-02','bB-01-02-01'], _
        ['bb-01-02-01','bb-01-02-01-01'], _
        ['bb-01-02','bb-01'], _
        ['bb-01','added to first bb-01'], _
        ['aA','aA-01'] _
                        ]

Local $gui010 = GUICreate('TreeView Example',500,500)
Local $tv010 = GUICtrlCreateTreeView(10, 30, 200, 400)
guictrlcreatelabel('TreeView #1',10,10,100,20)
guictrlsetfont(-1,8.5,600)
Local $tv011 = GUICtrlCreateTreeView(290, 30, 200, 400)
guictrlcreatelabel('TreeView #2',290,10,100,20)
guictrlsetfont(-1,8.5,600)
_pop_treeview($tv010,$aTV1)
_pop_treeview($tv011,$aTV2)
GUISetState()

While 1
    Switch GUIGetMsg()
        Case $gui_event_close
            Exit
    EndSwitch
WEnd

func _pop_treeview($hTV,$array)

    ; populate the treeview control
    ;
    ; note - _My_GUICtrlTreeView_FindItem is a replacement for UDF
    ;        _GUICtrlTreeView_FindItem to accomodate case sensitivity

    _GUICtrlTreeView_BeginUpdate($hTV)
    For $1 = 0 To UBound($array) - 1
        if $array[$1][0] = '' then exitloop
        If $array[$1][0] = '0' Then
            _GUICtrlTreeView_Add($hTV, 0, $array[$1][1])
        Else
            $hitem = _My_GUICtrlTreeView_FindItem($hTV, $array[$1][0])
            If $hitem <> 0 Then
                _GUICtrlTreeView_AddChild($hTV, $hitem, $array[$1][1])
            Else
                ConsoleWrite('! Skipping ' & $array[$1][0] & ' cannot find parent' & @LF)
            endif
        EndIf
    Next
    _GUICtrlTreeView_EndUpdate($hTV)
    _GUICtrlTreeView_Expand($hTV)
endfunc

Func _My_GUICtrlTreeView_FindItem($hWnd, $sText, $fInStr = False, $hStart = 0)

    If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd)

    If $hStart = 0 Then $hStart = _GUICtrlTreeView_GetFirstItem($hWnd)
    While $hStart <> 0x00000000
        Local $sItem = _GUICtrlTreeView_GetText($hWnd, $hStart)
        Switch $fInStr
            Case False
                If $sItem == $sText Then Return $hStart
            Case True
                If StringInStr($sItem, $sText) Then Return $hStart
        EndSwitch
        $hStart = _GUICtrlTreeView_GetNext($hWnd, $hStart)
    WEnd
EndFunc   ;==>_GUICtrlTreeView_FindItem

kylomas


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

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  

  • Similar Content

    • By _leo_
      Hey there! 😃
      I am having a problem with the _Excel_RangeFind. I am trying to search for a value in a particular cell range. The script copies the value from the internet. Copying and saving as a variable is working fine, but as soon as it should find the value in excel, nothing happens. ( I am not getting an error)
      #include <Excel.au3> Func Excel() Send("{CTRLDOWN}") Send("{c}") Send("{CTRLUP}") Local $sName = ClipGet() ;Text Local $sShortName = StringTrimRight ( $sName, 1) ;delete one letter Local $bOpenWorkBook = False, $oExcel = _Excel_Open() Local $sFilePath = "C:\Users\Acer\OneDrive\xyz.xlsx" Local $oWorkbook $oWorkbook = _Excel_BookAttach($sFilePath) If @error Then $oWorkbook = _Excel_BookOpen($oExcel, $sFilePath) $bOpenWorkBook = True EndIf sleep(15000) Send("{LWINDown}") Send ("{up}") ;maximize window Send("{LWINup}") sleep(1000) _Excel_RangeFind ($oWorkbook, $sShortName, "A3:A56") EndFunc Is anyone familiar with this problem or am I just missing some basic stuff? 
      Thanks for help!
    • By _leo_
      Hey guys
      I'm new to autoit, so this could be a simple question. I'm trying to read the value from the currently selected cell in Excel. I read on the forum and tired to find videos, but I couldn't quite get to it. 
      This is what I have got so far:
       
      Local $oExcel_1 = _Excel_Open()
      Local $var = "C:\Users\Acer\xy"
      Local $oWorkbook = _Excel_BookOpen($oExcel_1,$var)
       
      Local $_read1 = _Excel_RangeRead($oWorkbook, Default.Application.ActiveCell.Address)
       
      Whatever I try, I either get an error or it only reads "0".
       
      Thank you very much for any helpful thoughts!
    • By nacerbaaziz
      hello sirs, i've created a tool to the blind users, this tool helps the blind to listen to a audio effect when moving between the GUIs controls on they computers
      where this tool can get the class for the current focus control and play a sound from a folder
      i've added all the knowne classes, but i found some problems i hope any one can help me.
      this is the code that i created

      #include <WinAPISys.au3> Global $h_CurrentHWNDFocus = "", $h_CurrentControlHWNDFocus = "" AdlibRegister("WindowAudioFocus", 50) Func WindowAudioFocus()     Local $h_NewHWNDFocus = WinGetHandle("[active]", "")     Local $h_NewControlHWNDFocus = ControlGetFocus($h_NewHWNDFocus, "")     If ($h_NewHWNDFocus = $h_CurrentHWNDFocus) And ($h_NewControlHWNDFocus = $h_CurrentControlHWNDFocus) Then Return 0     AdlibUnRegister("WindowAudioFocus")     If Not ($h_NewHWNDFocus = $h_CurrentHWNDFocus) Then         SoundPlay(@ScriptDir & "\focus_Audio\WindowChanged.wav")     Else         Switch _WinAPI_GetClassName(ControlGetHandle($h_NewHWNDFocus, "", $h_NewControlHWNDFocus))             Case "Button", "Start", "TrayButton", "TrayShowDesktopButtonWClass", "sbutton", "CirrussButton", "ODbcButton", "ThunderRTCommandButton", "ThunderSSOption", "ThunderSSCommand", "ThunderCommandButton", "ThunderRT6CommandButton", "ThunderRT5CommandButton", "TButton", "TBitBtn", "TAdvGlowButton", "ButtonWndClass", "afx:0:376:baa946", "_AOL_Button"                 If _IsCheckBox(ControlGetHandle($h_NewHWNDFocus, "", $h_NewControlHWNDFocus)) Then                     SoundPlay(@ScriptDir & "\focus_Audio\checkBox.wav")                 ElseIf _IsRadio(ControlGetHandle($h_NewHWNDFocus, "", $h_NewControlHWNDFocus)) Then                     SoundPlay(@ScriptDir & "\focus_Audio\radio.wav")                 Else                     SoundPlay(@ScriptDir & "\focus_Audio\button.wav")                 EndIf             Case "ComboBox", "ComboBoxEx32", "MSOBALLOONREComboBox20W", "REComboBox20W", "ThunderComboBox", "ThunderDriveListBox", "ThunderRT6ComboBox", "TORComboEdit", "TCombobox", "TComboBoxEx", "TORComboBox", "TColorBox", "TNFComboBox", "Internet Explorer_TridentCmbobx", "ComboWndClass", "_AOL_ComboBox", "ThunderRT5ComboBox", "ComboLBox"                 SoundPlay(@ScriptDir & "\focus_Audio\list.wav")             Case "Edit", "SearchBox", "TChatRichEdit", "_WwN", "_WwO", "RichEdit20A", "RichEdit20WPT", "RICHEDIT60W", "OKttbx", "RichEditA", "ThunderTextBox", "ThunderRT6TextBox", "ThunderRT5TextBox", "TEdit", "TRichEdit", "TRichEditViewer", "TMemo", "TInplaceEditList", "TLabeledEdit", "TMaskEdit", "TDateTimePicker", "TRichEdit", "TCaptionMemo", "TAddictRichEdit", "TCaptionEdit", "RichTextWndClass", "TextWndClass", "PasswordWndClass", "TextAreaWndClass", "MSWorksDoc", "_AOL_Edit", "SysDateTimePick32"                 SoundPlay(@ScriptDir & "\focus_Audio\edit.wav")             Case "ListBox", "ComboLBox", "REListBox20W", "SUPERGRID", "OUTEXVLB", "WMSUIVLB", "SchdmapiVLB", "VLBClass", "ThunderDirListBox", "ThunderFileListBox", "ThunderListBox", "ThunderRT6ListBox", "ThunderRT5ListBox", "TListbox", "TValueListEditor", "TORCalendar", "TColorListBox", "TCheckListBox", "Internet Explorer_TridentLstBox", "ListBoxWndClass", "ListWndClass", "hh_kwd_vlist", "afx:8:376:0:946", "_AOL_ListBox", "_AOL_Tree", ""                 SoundPlay(@ScriptDir & "\focus_Audio\List.wav")             Case "SysListView32", "OpenListView", "wuDuiListView", "ListView20WndClass", "TcxGridSite", "TListView", "TSystemListView", "ListViewWndClass", ""                 SoundPlay(@ScriptDir & "\focus_Audio\ListView.wav")             Case "SysTreeView32", "SearchTreeList", "FeatureTree", "TreeView20WndClass", "TSystemTreeView", "TTreeView", ""                 SoundPlay(@ScriptDir & "\focus_Audio\TreeView.wav")             Case Else                 SoundPlay(@ScriptDir & "\focus_Audio\focus.wav")         EndSwitch     EndIf     $h_CurrentHWNDFocus = $h_NewHWNDFocus     $h_CurrentControlHWNDFocus = $h_NewControlHWNDFocus     AdlibRegister("WindowAudioFocus", 50)     Return 1 EndFunc   ;==>WindowAudioFocus Func _IsCheckBox($ctrl_hwnd)     $Style = _WinAPI_GetWindowLong($ctrl_hwnd, $GWL_STYLE)     Return BitAND($Style, $BS_CHECKBOX) = $BS_CHECKBOX EndFunc   ;==>_IsCheckBox Func _IsRadio($ctrl_hwnd)     $Style = _WinAPI_GetWindowLong($ctrl_hwnd, $GWL_STYLE)     Return BitAND($Style, $BS_AUTORADIOBUTTON) = $BS_AUTORADIOBUTTON EndFunc   ;==>_IsRadio
      what i need from you is :
      play a sound when a menu item focus, that sound named menu.wav
      play a sound named items.wav when the users move on list box items or list view or treeview items or a combobox items
      please if can any one help me i'll very happy
      thanks on advance
    • By nacerbaaziz
      hello sirs, please i created a tool witch get the focused control in a window and play a audio file linked with this controls
      e.g buttons, checkBoxes, radios, comboboxes, and others
      i know that their is a function that give us the control focus but it return the classNN
      i want to get the class name to use it with a switch and
      because their are more than class e.g button tbutton timagebutton tnewButton...
      please can any one help me to get the class name not the classnn
      thanks in advance
    • By nacerbaaziz
      good morning everybody.
      today i liked to share an small example with you
      which it an function to read the registry values as an array
      the result array is 2d array witch
      $a_array[n][0] = value name
      $a_array[n][1] = value Data
      $a_array[0][0] = values count
      here's the function

      #include <Array.au3> #include <WinAPIReg.au3> #include <APIRegConstants.au3> Local $a_array = _RegReadToArray("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run") If @error Then     MsgBox(16, "error", @error)     Exit EndIf _ArrayDisplay($a_array) Func _RegReadToArray($s_RegKey)     Local $a_KeySplitInfo = StringSplit($s_RegKey, "\\", 2)     If UBound($a_KeySplitInfo) <= 1 Then         $a_KeySplitInfo = StringSplit($s_RegKey, "\", 2)         If UBound($a_KeySplitInfo) <= 1 Then Return (1, 1, 0)     EndIf     Local $H_KeyInfo = "", $s_RegKeyInfo = ""     Switch $a_KeySplitInfo[0]         Case "hklm", "HKEY_LOCAL_MACHINE", "hklm64", "HKEY_LOCAL_MACHINE64"             $H_KeyInfo = $HKEY_LOCAL_MACHINE         Case "hkCu", "HKEY_CURRENT_USER", "hkCU64", "HKEY_CURRENT_USER64"             $H_KeyInfo = $HKEY_CURRENT_USER         Case "hkCr", "HKEY_CLASSES_ROOT", "HKCR64", "HKEY_CLASSES_ROOT64"             $H_KeyInfo = $HKEY_CLASSES_ROOT         Case "HKU", "HKEY_USERS", "HKU64", "HKEY_USERS64"             $H_KeyInfo = $HKEY_USERS         Case Else             Return SetError(2, 2, 0)     EndSwitch     _ArrayDelete($a_KeySplitInfo, 0)     $s_RegKeyInfo = _ArrayToString($a_KeySplitInfo, "\")     Local $H_KeyInfoOpen = _WinAPI_RegOpenKey($H_KeyInfo, $s_RegKeyInfo, $KEY_READ)     Local $A_KeyInfo = _WinAPI_RegQueryInfoKey($H_KeyInfoOpen)     If @error Then Return SetError(1, 1, 0)     _WinAPI_RegCloseKey($H_KeyInfoOpen)     Local $A_RegVal[$A_KeyInfo[2] + 1][2]     Local $iV = 1, $s_RegRead = ""     While 1         $s_RegVal = RegEnumVal($s_RegKey, $iV)         If @error <> 0 Then ExitLoop         $s_RegRead = RegRead($s_RegKey, $s_RegVal)         If Not (@error) Then             $A_RegVal[$iV][0] = $s_RegVal             $A_RegVal[$iV][1] = $s_RegRead         EndIf         $iV += 1     WEnd     $A_RegVal[0][0] = UBound($A_RegVal) - 1     If $A_RegVal[0][0] >= 1 Then         Return $A_RegVal     Else         Return SetError(3, 3, 0)     EndIf EndFunc   ;==>_RegReadToArray
      i hope you benefit from it
      with my greetings
×
×
  • Create New...