Jump to content
therks

Trigger file's context menu

Recommended Posts

therks

Is there a way to trigger the menu that would appear when you right click a particular file? I've seen other programs do this, but I don't have the first idea where to start.

I have a couple uses, but at the moment is a duplicate file lister. It outputs results in a listview, and I'd like users to be able to get the actual menu that would appear if they were clicking on the actual files instead of just my listview items. Being able to drag/drop would be nice too if anyone knows it, but I'm focusing on the context menu for now.

Any help would be appreciated. Even if it's to tell me you're sure it can't be done, then I can stop thinking about it. :sweating:

Share this post


Link to post
Share on other sites
Subz

See example below from LarsJ, specifically the ListView.au3 example, drag and drop listview with context menu.

 

  • Thanks 1

Share this post


Link to post
Share on other sites
Earthshine
Posted (edited)

that's a LOT more work to go through than a few registry key creations in autoit.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
therks

Sorry @Earthshine, I guess I was not clear. I don't want to add things to a context menu, I want the normal Windows menu to appear when/where I want.

ie: I can click a button, and the normal Windows right click menu for a file will appear (with Open, Send To, Cut, Copy, Paste, Properties, etc).
Like imagine a function like this:

$aMouse = MouseGetPos()
_WinAPI_FileTrackPopupMenu('C:\windows\notepad.exe', $aMouse[0], $aMouse[1])

I'm sure it won't be that easy though. :lol:

@Subz There's a lot to go through on that thread, and I'm about to go to bed so I will give it a thorough look later. Hopefully it's what I'm looking for. Thanks!

  • Like 1

Share this post


Link to post
Share on other sites
Earthshine

ahh, good luck, hopefully he gave you close to what you want.


My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
therks

Just popping in to say that's exactly what I was looking for, @Subz. Never would have imagined it would entail building/managing the menu itself though. :lol:

  • Like 1

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×