caramen Posted November 16, 2018 Share Posted November 16, 2018 (edited) Ok guys Hello, I made a simple tool that is registering all copy paste action from an user. I did option tab (F1) Hide tab (F2) Search tab (F3) I tryed a bit to code my search tab but i cant figure out how to manage the index of my ListView with it. Exept if i use regexpression ... But i whould like to not use it. Not becose i am afraid of it. It s becose i ll share this code. I want to keep things easy. This is what i tryed but it doesn't work. If you can point me to the right logic i whould appreciate. Case $Recherche Rechercher () Func Rechercher () WinMove ("Caramen Copy Paste", "" , @DesktopWidth - 400 , 0 , 400 , 460 , 5 ) GUICtrlSetState($Console, $GUI_SHOW) GUICtrlSetState($Edit, $GUI_SHOW) $KeyWord = InputBox("Recherche", "Quelle mot clef rechercher ?" ) _GUICtrlListView_FindText ( $Console , $KeyWord ) _GUICtrlListView_EnsureVisible($Console, $KeyWord ) _GUICtrlListView_EnsureVisible($Console, _GUICtrlListView_GetItemCount($Console)-1) EndFunc ; Recherche Or maybe i am wrong and it is working but i have to focus ? Thx before. Edited November 16, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
caramen Posted November 16, 2018 Author Share Posted November 16, 2018 I am sure i am not so far Func Rechercher () WinMove ("Caramen Copy Paste", "" , @DesktopWidth - 400 , 0 , 400 , 460 , 5 ) GUICtrlSetState($Console, $GUI_SHOW) GUICtrlSetState($Edit, $GUI_SHOW) $tInfo = DllStructCreate($LVFI_PARTIAL) $KeyWord = InputBox("Recherche", "Quelle mot clef rechercher ?" ) _GUICtrlListView_FindText ( $Console , $KeyWord ) $ISearchThisIndex = _GUICtrlListView_FindItem ( $Console, -1 , $tInfo ) _GUICtrlListView_EnsureVisible($Console, $ISearchThisIndex ) EndFunc ; Recherche I am there ATM. My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
caramen Posted November 16, 2018 Author Share Posted November 16, 2018 (edited) Func Rechercher () WinMove ("Caramen Copy Paste", "" , @DesktopWidth - 400 , 0 , 400 , 460 , 5 ) GUICtrlSetState($Console, $GUI_SHOW) GUICtrlSetState($Edit, $GUI_SHOW) $tInfo = DllStructCreate($tagLVFINDINFO) DllStructSetData($tInfo, "Flags", $LVFI_PARTIAL ) $KeyWord = InputBox("Recherche", "Quelle mot clef rechercher ?" ) $KeywordFinded = _GUICtrlListView_FindText ( $Console , $KeyWord ) $ISearchThisIndex = _GUICtrlListView_FindItem ( $Console, -1 , $tInfo , $KeywordFinded ) MsgBox(0,"",""&$ISearchThisIndex) _GUICtrlListView_EnsureVisible($Console, $ISearchThisIndex ) EndFunc ; Recherche MsgBox = -1 Edited November 16, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
caramen Posted November 16, 2018 Author Share Posted November 16, 2018 Caramen try this sample !! Func Rechercher () WinMove ("Caramen Copy Paste", "" , @DesktopWidth - 400 , 0 , 400 , 460 , 5 ) GUICtrlSetState($Console, $GUI_SHOW) GUICtrlSetState($Edit, $GUI_SHOW) $tInfo = DllStructCreate($tagLVFINDINFO) DllStructSetData($tInfo, "Flags", $LVFI_PARTIAL ) $KeyWord = InputBox("Recherche", "Quelle mot clef rechercher ?" ) $KeywordFinded = _GUICtrlListView_FindText ( $Console , $KeyWord ) $ISearchThisIndex = _GUICtrlListView_FindInText ( $Console , $KeyWord , -1 ) MsgBox(0,"",""&$ISearchThisIndex) _GUICtrlListView_EnsureVisible($Console, $ISearchThisIndex ) EndFunc ; Recherche Thank you Caramen it is working . My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 16, 2018 Moderators Share Posted November 16, 2018 Helps when you put those parameters in the right spots "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
caramen Posted November 16, 2018 Author Share Posted November 16, 2018 I had also big trooble with highlighting. I did that it work very good : Func Rechercher () WinMove ("Caramen Copy Paste", "" , @DesktopWidth - 400 , 0 , 400 , 460 , 5 ) GUICtrlSetState($Console, $GUI_SHOW) GUICtrlSetState($Edit, $GUI_SHOW) $tInfo = DllStructCreate($tagLVFINDINFO) DllStructSetData($tInfo, "Flags", $LVFI_PARTIAL ) $KeyWord = InputBox("Recherche", "Quelle mot clef rechercher ?" ) $KeywordFinded = _GUICtrlListView_FindText ( $Console , $KeyWord ) $ISearchThisIndex = _GUICtrlListView_FindInText ( $Console , $KeyWord , -1 ) $MyControl = _GUICtrlListView_EnsureVisible($Console, $ISearchThisIndex ) $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) _GUICtrlListView_SetItemDropHilited($Console, $ISearchThisIndex , True) Sleep (100) _GUICtrlListView_SetItemDropHilited($Console, $ISearchThisIndex , False) Sleep (200) _GUICtrlListView_SetItemDropHilited($Console, $ISearchThisIndex , True) Sleep (300) _GUICtrlListView_SetItemDropHilited($Console, $ISearchThisIndex , False) Sleep (400) _GUICtrlListView_SetItemDropHilited($Console, $ISearchThisIndex , True) Sleep (500) _GUICtrlListView_SetItemDropHilited($Console, $ISearchThisIndex , False) Sleep (600) _GUICtrlListView_SetItemDropHilited($Console, $ISearchThisIndex , True) Sleep (700) _GUICtrlListView_SetItemDropHilited($Console, $ISearchThisIndex , False) Sleep (800) EndFunc ; Recherche My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki 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