Jump to content

Intercept Right-Click Listview Context Menu


TheSaint
 Share

Recommended Posts

@kylomas - Thanks for that, I will check it out.

@jaberwacky - What I coded, works to some degree, but randomly ... and of course, much of the code has been disabled for testing. Without that last, you can get all sorts or problems. At one point, I had my browser open up and endlessly add tabs trying to connect to an Amazon ebook page. And to top things off, the menu entry disabling I coded, doesn't work anyway.

To test fully, you need to have more than one item on your list and one of them needs to listed as having been bought. You then switch back and forth selecting the items using right-click only, and use something like the View price results menu item (when enabled), to check you are getting the correct ebook details returned. My original code does that. What it doesn't do, and why I've gone this alternate context menu route, is disable/gray the context menu item for Set ebook as a favorite, when the right-clicked ebook is a bought one ... as indicated by an entry in the ISBN column. If I select the ebook with left-click first and then right-click, all works as it should. I want to save a click, and just use right-click and get the same result. Especially as users can be forgiven for thinking it should work, and they may unknowingly commit changes to the wrong ebook. I have of course coded to prevent that last, by returning an error, but it would be more professional to avoid that.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

That would be the case with the modified code, as it would not be working correctly.

Have you tried the original script (>latest update here), and are fully conversant with how it works, before the modifications?

P.S. I'm taking a break from coding at the moment, so probably won't look at what kylomas provided, until tomorrow ... or maybe even Monday, as it will be the weekend.

P.S.S. Remember, the original code does mostly work correct with right-click ... just not the disable/grayed out context menu entry element ... unless left-click is used first.

The idea, is that you cannot have an ebook on the list, that is both bought and favorite. You can change a favorite to bought, but not the other way ... not without removing the bought indicator first. The favorite element, is only used for a quick Query of that group. It is not meant to be indicative of a favorite book you love. See favorite as meaning priority for checking.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Same issue with the latest update.  I'm using the books that I find on this page as tests: http://www.amazon.com/Best-Sellers-Kindle-Store-eBooks/zgbs/digital-text/154606011

Link to comment
Share on other sites

I just tried the first one listed there (The Dead Key) and it worked fine for me.

(though Cancel for anymore URLs failed, for some reason, so need to check that)

What is the nature of your issue again?

Did you try the exe from the uploaded zip file, as well?

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Damn it, I just discovered that I forgot to add in an extra Else statement, when I changed the original to ElseIf.

Some family member probably distracted me at a key moment or I just plain forgot.

I will have to amend that right away.

I just had another idea for an update too, but that may have to wait.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

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

×
×
  • Create New...