Hello,
Is it possible to prevent an application (e.g. Windows File Explorer) to show it's shell context menu when an item in it's listview is right-clicked (without doing this in the registry!)?
My script uses a timer (instead of a hotkey) to check which mouse buttons are pressed (and which modifiers as well) and I don't want the shell context menu come up in some cases (atm: on a simple right click with no modifiers)...
Using "Send, {ESC}" is not the way to do that, it just cancels the context menu (immediately) but it doesn't prevent it from being displayed...
Prevent shell-context menu from appearing?
Re: Prevent shell-context menu from appearing?
How about this.
Code: Select all
#If Win_Is("explorer.exe")
*RButton::return
Win_Is(process){
MouseGetPos, , , Hwnd
WinGet, ProcessName, ProcessName, ahk_id %Hwnd%
return ProcessName = process ? True : False
}
Please excuse my spelling I am dyslexic.
Re: Prevent shell-context menu from appearing?
Thank you Capn Odin
Unfortunately this is not about "ignoring" the right click (by immediately returning when it's used). I'm actually doing something inside my timer function when an item is right clicked but I don't want the shell context menu to appear afterwards. Sorry if my explanation was too ambiguous!
Unfortunately this is not about "ignoring" the right click (by immediately returning when it's used). I'm actually doing something inside my timer function when an item is right clicked but I don't want the shell context menu to appear afterwards. Sorry if my explanation was too ambiguous!
Who is online
Users browsing this forum: No registered users and 25 guests