Jump to content

Search the Community

Showing results for tags 'rtfm'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. So am reading a ControlListView() and is not working so I code a troubleshooter to figure it out. #AutoIt3Wrapper_UseX64=n #include <Array.au3> ; Remarks: ( from the help file ) ; ------------------------------------------------------------------------------------------------ ; Some commands may fail when using a 32-bit AutoIt process to read from a 64-bit process. ; Likewise commands may fail when using a 64-bit AutoIt process to read from a 32-bit process. Global $g_sAutoIt3Path = StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1)) If StringInStr($CmdLineRaw, "/GuiListviewToReadFrom") Then Exit GuiListviewToReadFrom() ShellExecute($g_sAutoIt3Path & "AutoIt3.exe", '"' & @ScriptFullPath & '" /GuiListviewToReadFrom') ;~ ShellExecute($g_sAutoIt3Path & "AutoIt3_x64.exe", '"' & @ScriptFullPath & '" /GuiListviewToReadFrom') Test() Func Test() Local $vRet = ReadTheListViewFromSomewhere() If @error And @error < 5 Then MsgBox(262144, @ScriptName, "Fail #:" & @error & @CR & $vRet, 10) Else _ArrayDisplay($vRet, 'Error: ' & @error & " - " & _ (@AutoItX64 ? "64-bit" : "32-bit") & " - " & _ @ScriptName, "", 0, Default, "Row A|Row B|Row C") EndIf WinClose("GuiListviewToReadFrom - ") EndFunc ;==>Test Func GuiListviewToReadFrom() Opt("TrayIconHide", 1) Local $iW = 400, $iH = 100, $sXbit = (@AutoItX64 ? "64-bit" : "32-bit") Local $hGui = GUICreate("GuiListviewToReadFrom - " & $sXbit, $iW, $iH) Local $idListview = GUICtrlCreateListView("Row A|Row B|Row C", 0, 0, $iW, $iH) GUICtrlCreateListViewItem("0-A|0-B|0-C", $idListview) GUICtrlCreateListViewItem("1-A|1-B|1-C", $idListview) GUICtrlCreateListViewItem("2-A|2-B|2-C", $idListview) GUISetState() While GUIGetMsg() <> -3 WEnd GUIDelete() EndFunc ;==>GuiListviewToReadFrom Func ReadTheListViewFromSomewhere($sTitle = "GuiListviewToReadFrom - ", $sLvCtrl = "SysListView321") If Not WinWait($sTitle, "", 3) Then Return SetError(1, 0, "Window not found") Local $hWin = WinGetHandle($sTitle) If @error Then Return SetError(2, 0, "No WinHandle") Local $n, $iItemCount = ControlListView($hWin, "", $sLvCtrl, "GetItemCount") If @error Then Return SetError(3, 0, "No ItemCount") Local $m, $iSubItemCount = ControlListView($hWin, "", $sLvCtrl, "GetSubItemCount") If @error Then Return SetError(4, 0, "No SubItemCount") Local $aArray[$iItemCount][$iSubItemCount] For $n = 0 To $iItemCount - 1 For $m = 0 To $iSubItemCount - 1 $aArray[$n][$m] = ControlListView($hWin, "", $sLvCtrl, "GetText", $n, $m) If @error Then Return SetError(5, 0, $aArray) ; "No ItemText") Next Next Return $aArray EndFunc ;==>ReadTheListViewFromSomewhere Did not need to do this.
×
×
  • Create New...