ioa747 Posted January 31, 2023 Share Posted January 31, 2023 I honestly don't know. have you try with ControlListView ? Remarks 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 I know that I know nothing Link to comment Share on other sites More sharing options...
Nine Posted January 31, 2023 Share Posted January 31, 2023 Show here the au3info of the listbox and the window “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
dd1978 Posted February 2, 2023 Author Share Posted February 2, 2023 how to specify 32bits or 64bits when I press F5 key? thanks Link to comment Share on other sites More sharing options...
ioa747 Posted February 2, 2023 Share Posted February 2, 2023 #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_UseX64=n I know that I know nothing Link to comment Share on other sites More sharing options...
dd1978 Posted February 3, 2023 Author Share Posted February 3, 2023 The code in Example_03 is still return -1, either compile by X64 or X86 following is content in tab Summary in my Au3Info: expandcollapse popup>>>> Window <<<< Title: Form_ListBox Class: WindowsForms10.Window.8.app.0.141b42a_r9_ad1 Position: 26, 26 Size: 338, 217 Style: 0x16CF0000 ExStyle: 0x00050100 Handle: 0x00000000000206C8 >>>> Control <<<< Class: WindowsForms10.LISTBOX.app.0.141b42a_r9_ad1 Instance: 1 ClassnameNN: WindowsForms10.LISTBOX.app.0.141b42a_r9_ad11 Name: ListBox1 Advanced (Class): [NAME:ListBox1] ID: 329282 Text: Position: 28, 28 Size: 176, 88 ControlClick Coords: 59, 54 Style: 0x562110C1 ExStyle: 0x00000200 Handle: 0x0000000000050642 >>>> Mouse <<<< Position: 121, 139 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<< Link to comment Share on other sites More sharing options...
dd1978 Posted February 3, 2023 Author Share Posted February 3, 2023 @ioa747 @Nine any advice, thanks Link to comment Share on other sites More sharing options...
ioa747 Posted February 3, 2023 Share Posted February 3, 2023 I do not know. that should work Local $win_ppt = "[TITLE:Form_ListBox; CLASS:WindowsForms10.Window.8.app.0.141b42a_r9_ad1]" Local $hWnd = WinActivate($win_ppt, "") Local $Test = ControlCommand($hWnd, "", "[NAME:ListBox1]", "IsVisible", "") I know that I know nothing Link to comment Share on other sites More sharing options...
dd1978 Posted February 3, 2023 Author Share Posted February 3, 2023 have you tried command “AddString” or “GetCount” for the list box? @ioa747 Link to comment Share on other sites More sharing options...
ioa747 Posted February 3, 2023 Share Posted February 3, 2023 no I know that I know nothing Link to comment Share on other sites More sharing options...
dd1978 Posted February 3, 2023 Author Share Posted February 3, 2023 just take a trying Link to comment Share on other sites More sharing options...
dd1978 Posted February 3, 2023 Author Share Posted February 3, 2023 is a bug? Link to comment Share on other sites More sharing options...
ioa747 Posted February 3, 2023 Share Posted February 3, 2023 I do not know. but GetCount return -1 I know that I know nothing Link to comment Share on other sites More sharing options...
dd1978 Posted February 3, 2023 Author Share Posted February 3, 2023 and AddString return an error. Is there a bug reports? Link to comment Share on other sites More sharing options...
Developers Jos Posted February 3, 2023 Developers Share Posted February 3, 2023 As you can clearly see: Everybody is stabbing in the dark as we have nothing concrete to test with. Is there anyway you can post a script example that should work and what we can test with? ...else we remain in this mode and will be called "No Bug" as there are many things that could cause this not to work. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
dd1978 Posted February 4, 2023 Author Share Posted February 4, 2023 (edited) @Josall codes about this issue are in the attachment in this post issue-2023-02-05.7z Edited February 6, 2023 by dd1978 Link to comment Share on other sites More sharing options...
ioa747 Posted February 6, 2023 Share Posted February 6, 2023 (edited) @dd1978 this example working ! #include <GUIConstantsEx.au3> #include <GuiListBox.au3> #include <MsgBoxConstants.au3> Example() Func Example() ; Create GUI GUICreate("List Box Get/Set Sel (v" & @AutoItVersion & ")", 400, 296) Local $idListBox = GUICtrlCreateList("", 2, 2, 396, 296, BitOR($LBS_STANDARD, $LBS_EXTENDEDSEL)) GUISetState(@SW_SHOW) ; Add strings _GUICtrlListBox_BeginUpdate($idListBox) For $iI = 0 To 9 _GUICtrlListBox_AddString($idListBox, StringFormat("%03d : string", $iI)) Next _GUICtrlListBox_EndUpdate($idListBox) ; Select a items _GUICtrlListBox_SetSel($idListBox, 3) ;---------------------------------------------------------------------------------------- ;Test ControlCommand GetCount Local $win_ppt = "[TITLE:List Box Get/Set Sel (v3.3.16.1); CLASS:AutoIt v3 GUI]" Local $hWnd = WinActivate($win_ppt, "") Local $Test = ControlCommand($hWnd, "", "ListBox1", "GetCount", "") MsgBox($MB_SYSTEMMODAL, "$Test ControlCommand GetCount", $Test) ;---------------------------------------------------------------------------------------- ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example I downloaded your file to try it out. Unfortunately without result! However, I did another ListBox and it works ??? I do not know why Edited April 2, 2023 by ioa747 del zip I know that I know nothing Link to comment Share on other sites More sharing options...
dd1978 Posted February 7, 2023 Author Share Posted February 7, 2023 @ioa747from your upload I notice that your win form is .net 5 and the form resource is defined in a DLL I am under .net 4.5 and work on VS2019. Is this reason? And could you try to write a win form project that compile form resource in EXE and take a look whether it works? Link to comment Share on other sites More sharing options...
ioa747 Posted February 7, 2023 Share Posted February 7, 2023 (edited) I also have this VS2019, I just updated it Edited February 7, 2023 by ioa747 I know that I know nothing Link to comment Share on other sites More sharing options...
dd1978 Posted February 7, 2023 Author Share Posted February 7, 2023 I have tried many times but cannot get reason. create win form under VS2019 with net 4.5: AddString command of function ControlCommand always get an error and nothing is added to list box create dialog under VS2019 with MFC: AddString command of function ControlCommand get an error but new lines were added to list box create dialog under VS2019 with MFC: GetCount command of function ControlCommand works well All above are tested against same code with any necessary modifying Link to comment Share on other sites More sharing options...
ioa747 Posted February 7, 2023 Share Posted February 7, 2023 (edited) WinFormsApp2 didn't you try it? Edited April 2, 2023 by ioa747 del zip I know that I know nothing 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