ufukkreis853 Posted November 22, 2023 Share 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 Link to comment Share on other sites More sharing options...
Nine Posted November 22, 2023 Share 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 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...
ufukkreis853 Posted November 22, 2023 Author Share Posted November 22, 2023 How can I collect subdata? Link to comment Share on other sites More sharing options...
Nine Posted November 22, 2023 Share 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 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...
ufukkreis853 Posted November 22, 2023 Author Share 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 Link to comment Share on other sites More sharing options...
ufukkreis853 Posted November 22, 2023 Author Share Posted November 22, 2023 (edited) Can you help Edited November 22, 2023 by ufukkreis853 Link to comment Share on other sites More sharing options...
ufukkreis853 Posted November 22, 2023 Author Share 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. Link to comment Share on other sites More sharing options...
Nine Posted November 23, 2023 Share 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 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...
ufukkreis853 Posted November 23, 2023 Author Share Posted November 23, 2023 I didn't see this, you are great man thnx Nine! 23 hours ago, 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... 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