ValentinM Posted 1 hour ago Share Posted 1 hour ago Thank you M23, I have a better understanding now. This is a better idea, and if I don't misunderstand, it will save some resources as this function will not check every time if there is an ongoing edit process. I successfully implemented your function, this way : Func DeleteRow() If _GUIListViewEx_EditProcessActive() <> 0 Then StopHotkeys() Send("{DELETE}") Return EndIf If _GUICtrlListView_GetSelectedCount($iIDListView) > 0 Then ; My delete code Else ; Error case EndIf EndFunc The only thing that bothers me is that I need to manually send the 'DELETE' key to my GUI. Otherwise, the first 'DELETE' keypress will not delete a char in the edit field. PS : The function you typed in your example doesn't match the function in your UDF ( _GUIListViewEx_EditProcess() -> _GUIListViewEx_EditProcessActive() ). May the force be with you. Open AutoIt Documentation within VS Code Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted 1 hour ago Author Moderators Share Posted 1 hour ago ValentinM, Quote This is a better idea Thanks! Quote it will save some resources as this function will not check every time if there is an ongoing edit process Correct - which I why I went down that route. As to the Delete key problem - how are you setting the HotKey to fire the DeleteRow function? Are you using modifiers or just the plain Delete key? 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...
ValentinM Posted 50 minutes ago Share Posted 50 minutes ago (edited) I don't know what you call "modifiers" so I will try to go a bit deeper in details to be clear. I have two functions that manages my hotkeys, StartHotkeys() and StopHotkeys(). So the only thing I do to get my Hotkeys firing my functions is for example : HotKeySet("{DELETE}", "DeleteRow") And sometimes in the app, I don't want the Hotkeys to be on (ie. when a file is loading, if my GUI doesn't have the focus,...), so when it happens I use StopHotkeys() that basically does the same thing without calling a function. HotKeySet("{DELETE}") Did I answer you correctly? EDIT : Just googled "modifiers" and seems like it's just like pressing "Shift" or "Ctrl"... So I am not using modifiers for deleting rows. Edited 47 minutes ago by ValentinM LMGTFY May the force be with you. Open AutoIt Documentation within VS Code Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted 14 minutes ago Author Moderators Share Posted 14 minutes ago ValentinM, Quote I am not using modifiers Which is what I suspected and why I asked. If you were to use modifiers for your HotKey than you would be able to use the simple {DELETE} key within the edit. That is why the modifiers exist. 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...
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