mickdu59 Posted July 6, 2020 Share Posted July 6, 2020 Hello, I wanted to know if we can search for example (microsoft edge, chrome, opera) to classify them in a corresponding listview in the right category with IniReadSectionNames ($ iniFile) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 6, 2020 Moderators Share Posted July 6, 2020 mickdu59, Your question is very unclear. The title speaks of 2 ListViews, yet your question speaks of browsers and ini files. Just what exactly do you want to do? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
mickdu59 Posted July 6, 2020 Author Share Posted July 6, 2020 Sorry I expressed myself badly, basically I wanted to know if it is possible to search several words in a listview, and then classified them in another if it matches Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 6, 2020 Moderators Share Posted July 6, 2020 mickdu59, The answer is almost certainly "Yes", but without more details it is difficult to give you any real help. How about some examples of what you have listed in the first ListView and how you want to display the "found" words in the second. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
mickdu59 Posted July 6, 2020 Author Share Posted July 6, 2020 (edited) Sorry if I speak badly, I am French, I use Google translation, look at the screen La Edited July 6, 2020 by mickdu59 Add comments Link to comment Share on other sites More sharing options...
Dan_555 Posted July 7, 2020 Share Posted July 7, 2020 (edited) like this ? expandcollapse popup#include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <MsgBoxConstants.au3> Local $idListview, $searchtext, $y, $z, $tmp GUICreate("ListView Get Item Text", 400, 350) $idListview = GUICtrlCreateListView("", 2, 2, 194, 268) $idListview1 = GUICtrlCreateListView("", 202, 2, 194, 268) $inputbox = GUICtrlCreateInput("", 2, 280, 200, 20) $button = GUICtrlCreateButton("Search", 212, 280, 50, 20) GUISetState(@SW_SHOW) ; Add columns _GUICtrlListView_AddColumn($idListview, "Items", 100) _GUICtrlListView_AddColumn($idListview, "Desc", 100) _GUICtrlListView_AddColumn($idListview1, "Copy", 100) _GUICtrlListView_AddColumn($idListview1, "Desc", 100) Local $array[] = ["Music", "Video", "Audio"] Local $drray[] = ["abc","def","ghi","jkl"," "] For $x = 0 To 50 _GUICtrlListView_AddItem($idListview, "Item " & $x & " " & $array[Random(0, 3)]) _GUICtrlListView_AddSubItem($idListview, $x, $drray[Random(0, 3)] & $drray[Random(0, 4)] & $drray[Random(0, 3)] , 1) Next ; Loop until the user exits. While 1 $nmsg = GUIGetMsg() If $nmsg = $GUI_EVENT_CLOSE Then ExitLoop If $nmsg = $button Then $searchtext = GUICtrlRead($inputbox) If $searchtext <> "" Then _GUICtrlListView_BeginUpdate($idListview1) _GUICtrlListView_DeleteAllItems($idListview1) $y = _GUICtrlListView_GetItemCount($idListview) For $x = 0 To $y $tmp = _GUICtrlListView_GetItemText($idListview, $x) If StringInStr($tmp, $searchtext) Then _GUICtrlListView_SetItemSelected($idListview, $x) _GUICtrlListView_CopyItems($idListview, $idListview1) EndIf Next _GUICtrlListView_EndUpdate($idListview1) EndIf EndIf WEnd GUIDelete() Edited July 7, 2020 by Dan_555 Some of my script sourcecode Link to comment Share on other sites More sharing options...
careca Posted July 7, 2020 Share Posted July 7, 2020 For auto updating the results i use this: expandcollapse popup#include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <MsgBoxConstants.au3> Local $idListview, $searchtext, $y, $z, $tmp GUICreate("ListView Get Item Text", 400, 350) $idListview = GUICtrlCreateListView("", 2, 2, 194, 268) $idListview1 = GUICtrlCreateListView("", 202, 2, 194, 268) $inputbox = GUICtrlCreateInput("", 2, 280, 200, 20) ;$button = GUICtrlCreateButton("Search", 212, 280, 50, 20) GUISetState(@SW_SHOW) ; Add columns _GUICtrlListView_AddColumn($idListview, "Items", 100) _GUICtrlListView_AddColumn($idListview, "Desc", 100) _GUICtrlListView_AddColumn($idListview1, "Copy", 100) _GUICtrlListView_AddColumn($idListview1, "Desc", 100) Local $array[] = ["Music", "Video", "Audio"] Local $drray[] = ["abc", "def", "ghi", "jkl", " "] Local $FolderCheck, $SrchValueCmp = '' For $x = 0 To 50 _GUICtrlListView_AddItem($idListview, "Item " & $x & " " & $array[Random(0, 3)]) _GUICtrlListView_AddSubItem($idListview, $x, $drray[Random(0, 3)] & $drray[Random(0, 4)] & $drray[Random(0, 3)], 1) Next ; Loop until the user exits. While 1 $SrchValue = GUICtrlRead($inputbox) If $SrchValue <> $SrchValueCmp Then $SrchValueCmp = $SrchValue If StringLen($SrchValue) > 3 Then SearchList($SrchValue) EndIf EndIf ;============================================================================= $nmsg = GUIGetMsg() If $nmsg = $GUI_EVENT_CLOSE Then ExitLoop WEnd ;============================================================================= Func SearchList($FindText) _GUICtrlListView_DeleteAllItems($idListview1) $Files = _GUICtrlListView_GetItemCount($idListview) For $k = 1 To $Files $STRResult = StringInStr(_GUICtrlListView_GetItemText($idListview, $k - 1, 0)&_GUICtrlListView_GetItemText($idListview, $k - 1, 1), $FindText, 0) If $STRResult <> 0 Then $RandomColor = "0x" & StringRight(Hex(Random(150, 255, 1)), 2) & StringRight(Hex(Random(150, 255, 1)), 2) & StringRight(Hex(Random(150, 255, 1)), 2) GUICtrlCreateListViewItem(_GUICtrlListView_GetItemText($idListview, $k - 1, 0) & '|' & _GUICtrlListView_GetItemText($idListview, $k - 1, 1), $idListview1) GUICtrlSetBkColor(_GUICtrlListView_GetItemParam($idListview1, _GUICtrlListView_GetItemCount($idListview1) - 1), $RandomColor) EndIf Next EndFunc ;==>SearchList ;============================================================================= only updates when the input is bigger than 3 characters. Dan_555 1 Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe 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