Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/01/2024 in all areas

  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.
    1 point
  2. 1. What driver are you using 8.2? go to start menu Search for ODBC connections. There might be 64 and 32 Bit Options . Try to Open Both. Check the version and See What Odbc drivers u have. Try Using All the Possible Combinations. For Me ANSI worked Well. I know m too late to respond but i just hope not too late to respond
    1 point
  3. Use _GDIPlus_GraphicsSetTextRenderingHint to smooth string drawings.
    1 point
  4. Thanks for the help Danyfirex but you changed your reply afterwards...I was replying to your initial answer. The first suggestion of your modified reply works: adding the ampersand. Second one does not. Second one works too ! Edit: must have made a typo somewhere first time around...sorry 😓
    1 point
  5. Hello. Add & to /c powershell -Command "' & ' & {Get-NetAdapter | Where-Object InterfaceType -eq 71}' or Remove { and } Saludos
    1 point
  6. BinaryToString() also have a flag parameter that allows you to convert your data. Check the help file.
    1 point
  7. Local $hFile = FileOpen(@ScriptDir & '\news.txt', 3) ;~ here 3 means : $FO_APPEND(1) + $FO_OVERWRITE(2) ;~ you have To add plus $FO_UTF8_NOBOM(256) so 1 + 2 + 256 = 259 Local $hFile = FileOpen(@ScriptDir & '\news.txt', 259)
    1 point
  8. Yeah, it's not for text and numbers at the same time... that's what we as programmers are supposed to do (which is why I thought you wrote your wrapper... eg. a personal preference) lol... I'm not gonna write an entire parser (well I don't think I am 😶). Just looking at multiple languages and trying to understand how they are formed just for numbers gives me a headache. I have an update for this version already... but I'm playing around with a different way of doing things .. while I think the new way is safer atm and has the ability to do more with more languages without getting lost in 10s of thousands of lines of code... I'm noticing a bit of a speed difference... about 15ms, and it's annoying me. So I'll play around with that for a while to see where it can go if anywhere, then I'll post both versions in the first post.
    1 point
  9. Here are few more references but you can find most of the important ones on MSDN. Word PowerPoint InternetExplorer WinHTTPRequest XML DOM
    1 point
  10. LAteNightSpecial did show "its" true nature and got indefinitely banned for that. Also done some posts cleanup to avoid any more discussion/questions.
    1 point
  11. I don't know how you imagine it's working but it's not number of fixed properties/methods that AutoIt should list in help file because it really depends on the used object and what actually implements that object. For example, if you want to automate an excel application and you want to set multiple properties you can use With to reduce the long references and the full list of available methods and properties can be found on MSDN.
    1 point
  12. Ugh.. I see what you're doing wrong now (a fast answer is not always the best). I thought this problem was more complicated. The window class is: HwndWrapper[sewmain.exe;;e407155a-3d68-4e3d-927c-3d298e0968fa] It's not: HwndWrapper. By default it doesn't do a partial match. Try using [REGEXPCLASS:HwndWrapper.*]
    1 point
×
×
  • Create New...