Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
check if item is being edited in windows explorer
#1
In windows file explorer the user can edit the name of a listed folder or file.
(When the user is editing the name of an item, a rectangle is displayed around the item and a cursor is visible.)

I want to use the backspace key as a trigger to a macro that just sends a backspace if the name of an item
is being edited (so that the character before the cursor is deleted), but does something else if no item is being edited.

Is there a way to determine wether the name of some item is being edited, or not?
#2
EDIT: this will not work, see my next post.

Macro Macro2706
Code:
Copy      Help
if(IsMouseCursor(IDC_IBEAM)) out "editing"

Function IsMouseCursor is in Archive.qml: Collected QM apps, functions, samples
#3
Thanks, but It's not working the way it's supposed to.

The code does indeed recognize an I-beam mousecursor, but he mousecursor only becomes an I-beam if I position the mouse over the item I'm editing. That's almost never the case because I just tap F2 in windows file explorer to edit the name of an item (the mouse can be anywhere and is an arrow). A blinking cursor is visible when I'm editing the item name, but this is not the mouse cursor.

Is there another way to detect an item name being edited, not making use of the mousecursor?
#4
Sorry, need caret, not cursor.

Macro Macro2708
Code:
Copy      Help
GUITHREADINFO g.cbSize=sizeof(GUITHREADINFO)
if GetGUIThreadInfo(0 &g) and g.hwndCaret
,out "yes"
else
,out "no"
#5
Yes, it works! Thank you very much.


Forum Jump:


Users browsing this thread: 1 Guest(s)