View Single Post
Old 05-05-2015, 06:03 AM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,475
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ivanm View Post
Is it possible to have different behaviour based upon a ctrl/shift click? (e.g. ctrl-click is AND, shift-click is OR)
Not without some significant coding in calibre.

Also, I question the utility given and/or precedence (and is higher than or). It isn't easy to visualize how a series of and/or clauses will evaluate, which is why it is probably a good idea to use parentheses to make things explicit. One could help out by parsing the expression then regenerating it with parens in the right places, but this adds even more complexity to the changes.

I suggest you construct the series of tests, then manually change the incorrect operators and possibly add parentheses.
chaley is offline   Reply With Quote