ufukkreis853 Posted November 22, 2023 Posted November 22, 2023 Hello, I need your help. There is a small problem that I cannot solve, although it may be simple for you. How can I add the $size variable each time and get the result to 100? Thnx for help . I cant speak english i use google translate , sorry for my bad english. #include <GUIConstantsEx.au3> #include <GuiListView.au3> Example() Func Example() Local $idListview GUICreate("try", 400, 300) $idListview = GUICtrlCreateListView("try|sub|", 2, 2, 394, 268) GUISetState(@SW_SHOW) For $i = 0 to 10 _GUICtrlListView_AddItem($idListview, "try") _GUICtrlListView_AddSubItem($idListview, $i, "10", 1) $size = 0 $size += _GUICtrlListView_GetItemText($idListview, $i, 1) $i += 0 Next MsgBox("64", "info", $size) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc
Solution Nine Posted November 22, 2023 Solution Posted November 22, 2023 #include <GUIConstants.au3> #include <GuiListView.au3> Example() Func Example() GUICreate("try", 400, 300) Local $idListview = GUICtrlCreateListView("try|sub|", 2, 2, 394, 268) GUISetState(@SW_SHOW) Local $size = 0 For $i = 0 To 9 _GUICtrlListView_AddItem($idListview, "try") _GUICtrlListView_AddSubItem($idListview, $i, "10", 1) $size += _GUICtrlListView_GetItemText($idListview, $i, 1) Next MsgBox("64", "info", $size) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE EndFunc ;==>Example You were close... “They did not know it was impossible, so they did it” ― Mark Twain Reveal hidden contents 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) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Nine Posted November 22, 2023 Posted November 22, 2023 When you translate with Google use the copy icon, so the size of the font is normal. As for your question, I must not understand what you mean, because it is what we are doing, isn't it ? “They did not know it was impossible, so they did it” ― Mark Twain Reveal hidden contents 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) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
ufukkreis853 Posted November 22, 2023 Author Posted November 22, 2023 (edited) I want to collect the "addsubitem" part that I added to the list. I want all of the "addsubitems" I have to be collected and displayed as a result. Edited November 22, 2023 by ufukkreis853
ufukkreis853 Posted November 22, 2023 Author Posted November 22, 2023 (edited) Can you help Edited November 22, 2023 by ufukkreis853
ufukkreis853 Posted November 22, 2023 Author Posted November 22, 2023 I added 10 "addsubitems" and they should be added together with a single command and the result should be 100, for example.
Nine Posted November 23, 2023 Posted November 23, 2023 Clear as mud. Totally no idea what you are talking about. Produce some code that does not work. Explain what you expect based on that code. Andreik and Musashi 2 “They did not know it was impossible, so they did it” ― Mark Twain Reveal hidden contents 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) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
ufukkreis853 Posted November 23, 2023 Author Posted November 23, 2023 I didn't see this, you are great man thnx Nine! On 11/22/2023 at 7:59 PM, Nine said: #include <GUIConstants.au3> #include <GuiListView.au3> Example() Func Example() GUICreate("try", 400, 300) Local $idListview = GUICtrlCreateListView("try|sub|", 2, 2, 394, 268) GUISetState(@SW_SHOW) Local $size = 0 For $i = 0 To 9 _GUICtrlListView_AddItem($idListview, "try") _GUICtrlListView_AddSubItem($idListview, $i, "10", 1) $size += _GUICtrlListView_GetItemText($idListview, $i, 1) Next MsgBox("64", "info", $size) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE EndFunc ;==>Example You were close... Expand
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