therks Posted April 20, 2018 Share Posted April 20, 2018 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. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Earthshine Posted April 20, 2018 Share Posted April 20, 2018 (edited) look up how to create context menu entries in windows https://stackoverflow.com/questions/20449316/how-add-context-menu-item-to-windows-explorer-for-folders so it looks like some registry work for you, and maybe other assets if you choose. Edited April 20, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Subz Posted April 20, 2018 Share Posted April 20, 2018 See example below from LarsJ, specifically the ListView.au3 example, drag and drop listview with context menu. therks 1 Link to comment Share on other sites More sharing options...
Earthshine Posted April 20, 2018 Share Posted April 20, 2018 (edited) that's a LOT more work to go through than a few registry key creations in autoit. Edited April 20, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
therks Posted April 20, 2018 Author Share Posted April 20, 2018 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. @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! Earthshine 1 My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Earthshine Posted April 20, 2018 Share Posted April 20, 2018 ahh, good luck, hopefully he gave you close to what you want. My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
therks Posted April 21, 2018 Author Share Posted April 21, 2018 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. Earthshine 1 My AutoIt Stuff | My Github 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