cdeb Posted July 9, 2009 Share Posted July 9, 2009 _GUICtrlListView_GetItemTextString why returns strange characters?$var = _GUICtrlListView_GetItemTextString($hListView, 1) ConsoleWrite("->$var: " & $var & @CRLF)return: ->$var: |||||||||||| Link to comment Share on other sites More sharing options...
water Posted July 9, 2009 Share Posted July 9, 2009 The index to _GUICtrlListView_GetItemTextString is 0 based so 1 means: return the second line of the listview. The problem you see might be cause by either line 2 of your ListView is empty or there is no item with index 1 in the listview. To narrow down the problem: Could you post your code? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
cdeb Posted July 9, 2009 Author Share Posted July 9, 2009 the code: ... ; OK return: 0x0007043A $hListView = ControlGetHandle($title, "", "SysListView321") ConsoleWrite("$hListView " & $hListView & @CRLF) ; OK return: 394322 $aHeader = _GUICtrlListView_GetHeader($hListView) ConsoleWrite("$aHeader " & $aHeader & @CRLF) ; OK return: 45 $Var = _GUICtrlListView_GetItemCount($hListView) ConsoleWrite("Count " & $Var & @CRLF) If $Var > 1 Then For $i = 0 To $Var - 1 ConsoleWrite("-->ListView:" & _GUICtrlListView_GetItemTextString($hListView, $i) & @CRLF) Next EndIf info app: >>>> Window <<<< Title: Casino di Venezia Class: TNCMDTARGETFRM__7bbd Position: 186, 101 Size: 786, 609 Style: 0x96CA0000 ExStyle: 0x00000100 Handle: 0x00100876 >>>> Control <<<< Class: SysListView32 Instance: 1 ClassnameNN: SysListView321 Advanced (Class): [CLASS:SysListView32; INSTANCE:1] ID: 101 Text: Position: 10, 197 Size: 582, 288 ControlClick Coords: 184, 116 Style: 0x5020540D ExStyle: 0x00000000 Handle: 0x000C08FC >>>> Mouse <<<< Position: 383, 436 Cursor ID: 0 Color: 0xF4F4F4 >>>> StatusBar <<<< >>>> Visible Text <<<< Casino di Venezia tn_sprite >>>> Hidden Text <<<< Link to comment Share on other sites More sharing options...
MaxisteDeams Posted October 3, 2009 Share Posted October 3, 2009 I Beleive, All weirdeness, belong to transition from Dll call where a Function can be called with Suffix A... like StringReadA, you can get the same lib with StringReadW... Depends what you are using... Get a Object Dump, like one coming from Cygwin and gcc suite... objdump --section=import --all-headers --full-contents /WINDOWS/SysWOW64/user32.dll | egrep ".[AW]" | head -n 100 You will get all Call Function, and cardinal number to call it thru dllcall... ------------------------- /cygdrive/c/WINDOWS/SysWOW64/user32.dll: file format pei-i386 /cygdrive/c/WINDOWS/SysWOW64/user32.dll HAS_RELOC, EXEC_P, HAS_DEBUG, D_PAGED SectionAlignment 00010000 FileAlignment 00000200 Subsystem 00000002 (Windows GUI) NumberOfRvaAndSizes 00000010 Entry c 00010000 000004f4 Import Address Table Directory 72d92 462 GetSystemTimeAsFileTime 72dac 598 LoadLibraryA 72df2 454 GetSystemDirectoryW 72e08 506 GlobalAddAtomA 72e1a 387 GetModuleHandleA 72e2e 385 GetModuleFileNameA 72e44 511 GlobalFindAtomA 72e56 977 lstrlenA 72ea8 585 LCMapStringW 72eb8 494 GetVersionExW 72f1e 217 FindFirstFileW 72f30 225 FindNextFileW 72f60 978 lstrlenW 72f6c 783 SetCurrentDirectoryW 72f84 325 GetCurrentDirectoryW 72f9c 61 CompareStringW 72fd6 258 GetAtomNameA 72fe6 259 GetAtomNameW 72ff6 2 AddAtomW 73002 1 AddAtomA 73032 108 CreateProcessW 73044 417 GetPrivateProfileStringW 73060 136 DeleteFileW 7306e 629 MoveFileW 7307a 73 CopyFileW 73086 465 GetSystemWindowsDirectoryW 730da 88 CreateFileMappingW 7312c 446 GetStringTypeA 7313e 449 GetStringTypeW 73158 246 FoldStringW 731d0 507 GlobalAddAtomW 731e2 600 LoadLibraryExW 731f4 193 ExpandEnvironmentStringsW 73210 736 SearchPathW 73264 390 GetModuleHandleW 73278 232 FindResourceExA 7328a 233 FindResourceExW 732be 704 RegisterWaitForInputIdle 73300 611 LocalReAlloc 73310 257 GetACP 73366 512 GlobalFindAtomW 73378 969 lstrcmpiW 73390 916 WaitForMultipleObjectsEx 733ac 508 GlobalAlloc 733ba 633 MultiByteToWideChar 733d0 522 GlobalReAlloc 733f0 975 lstrcpynW 733fc 89 CreateFileW 7340a 943 WritePrivateProfileStringW 73428 921 WideCharToMultiByte 7344c 377 GetLocaleInfoW 7346c 386 GetModuleFileNameW 73482 517 GlobalGetAtomNameW 73498 516 GlobalGetAtomNameA 734c4 601 LoadLibraryW 734d4 420 GetProcAddress 734f4 132 DeleteAtom 73502 604 LocalAlloc 73510 510 GlobalDeleteAtom 73572 972 lstrcpyW 7357e 963 lstrcatW 73756 36 CopyEnhMetaFileW 7376a 38 CopyMetaFileW 737b2 606 bInitSystemAndFontsDirectoriesW 737d4 607 bMakePathNameW 73804 221 ExtTextOutA 73828 499 QueryFontAssocStatus 73840 349 GetCharWidthInfo 73854 345 GetCharWidthA 73864 444 GetTextFaceW 73874 338 GetCharABCWidthsA 73888 342 GetCharABCWidthsW 738ac 61 CreateFontIndirectW 738c2 206 EnumFontsW 738d0 443 GetTextFaceAliasW 738e4 446 GetTextMetricsW 73926 451 GetWindowExtEx 73986 238 GdiAddFontResourceW 739be 471 OffsetWindowOrgEx 739de 222 ExtTextOutW 73a5e 47 CreateDCW 73ba4 256 GdiConvertToDevmodeW 73bbc 439 GetTextExtentPointA 73bd2 441 GetTextExtentPointW 73bf8 554 SetLayoutWidth 73c14 591 TextOutA 73c20 592 TextOutW 73c44 246 GdiConvertAndCheckDC 73d40 408 GetObjectW 73d8c 428 GetTextAlign 73d9c 571 SetTextAlign 73e3e 467 RtlAllocateHeap Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now