Jump to content

How to send Right Click from keyboard


Fr33b0w
 Share

Recommended Posts

I did a search and found a lot of right click problems but I didnt find the one which could cover my problem. Its very simple, I need to SEND right click from a keyboard. Why? Well I am using Total Commander a lot and I need to pack a lot of files which are in separate folders. If I press ctrl+b from total commander it will show just files which are inside those folders. Then I need to right click files one by one, send "t" key to choose packing option from opened right click menu on that file, then send enter, then move cursor down to next file and repeat all pressed keys mention above. To make long story short I just need an example how to send a right click from my keyboard (which I have on my keyboard) not from a mouse because of a obvious reason that script should position selector from total commander not from real mouse.

   I have covered whats and whys from my question if anyone would like to know, but if I find how to send RIGHT CLICK key from keyboard - Problem Solved!!! Of course scrip could be written to search folders and pack every .mp4 file in directory branch but I know it would lead to more problems for sure because it needs to pack files with special settings. Since I have bugged some of You in a past (and above all others M23) I would just like to know how to send that key from a keyboard. Very simple request. Thank You in advance and have a great sunday!

Regards,

Freeb0w

Link to comment
Share on other sites

Well I dont know X & Y position, thats the problem, so thats why it needs to be sent from the keyboard. Because files are selected from another application (in this case total commander). I could calculate hight of every row but that would lead to more possible bugs in execution, especially when it comes to windows scrolling at the bottom of filelist. I did try to get it from spy.exe but I couldnt. Other possible solution would be to search solution in hotkeyp application so if I found there how to send that key I could use any other key in autoit and then convert it in hotkeyp in what I need. I will try that now but it would be great if this key could be sent from autoit.

Edit: Oh now when I did started hotkeyp I see that I did try to get it like that 4 days ago and couldnt get it...   I still have some macro tries there...

Edited by Fr33b0w
Link to comment
Share on other sites

Using _IsPressed func the right click keyboard key is 0x5D but I couldn't get it to "Send" from autoit. Using Total Commander it shouldn't be hard to figur out a "keyboard shortcut" to accomplish what a right click plus "t" does.  If you can find another shortcut instead of right clicking then just apply that. I don't use total Commander but I'm sure there has to be an alternative to using the context menu of a right click menu option.

I.E. Right click-->Copy (Ctrl+c) or right click --> Paste (Ctrl+v)

Edit: I downloaded TC and attempted to right click on an item and it wouldn't even give a drop down menu?!?

Edited by Rogue5099
Link to comment
Share on other sites

Thank You so much for trying to help. Total Commander and Autoit should be 2 best applications that I have ever used. Although autoit is not really an application, but whatever. Problem is that I am using Total Commander as an "viewer". I could get that also from explorer window but total commander suit me better for this. Function that I am calling is inside Winrar which have its own settings (put file in separate archives, compression level and so) so its not really a function from total commander...

EDIT: In your total commander it is set to select files. If you press right click and hold it for more then a second or so right click will appear. You can change that in settings. Mine works as yours, for selecting.

Edited by Fr33b0w
Link to comment
Share on other sites

Ah well then instead of using TC for winrar just send files to winrar. It would be best using commands without mouse clicks to accomplish task anyways. Look at >Melba's recursion example as well as searching for winrar/7zip/zip UDF's to accomplish your task.  I know that sounds like a lot instead of mouse clicking but it's more stable plus more universal! Also these "zip" programs should contain command line triggers to accomplish the tasks.

After posting noticed a small progress bar if you click and hold right button in TC. 

Link to comment
Share on other sites

Than You for your answer. It leads to solution and something nice to learn after all. Trouble is that I dont have much time to do that right now but will sure look into it after I finish all my obligations and come back here to say if it worked well for me. Thank you for your time I see that you really, really tried to help. I appreciate that!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...