Specific Window target, when two are rather identical

Discussion, questions and support.
Post Reply
User avatar
Oblomov
Posts: 118
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Jan 11th, ’21, 18:38

Hello,

I have two commands where:
• one has '.pdf', inside of the Window field
• and the other 'PDF to Image'

They share the same shortcut key and therefore are in conflict, with one another... I don't suppose there is perhaps some way to apply a 'match whole word' boundary in this case with a '\' or similar?

Tried a couple of things that didn't work, and couldn't find much online...

Hello,

Warm regards,
...
User avatar
Marko
Posts: 1258
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Jan 11th, ’21, 22:33

You can set two same shortcuts (for example both Alt+X) with different Window setting and it should work.
User avatar
Oblomov
Posts: 118
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Jan 12th, ’21, 18:09

Marko wrote:
Jan 11th, ’21, 22:33
You can set two same shortcuts (for example both Alt+X) with different Window setting and it should work.
Thanks for the feedback! Forgot to mention one key detail, both of these are in Chrome, so... I suppose that's not quite possible, lest I'm mistaken 🤔
User avatar
Marko
Posts: 1258
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Jan 12th, ’21, 21:19

If both, Shortcut and Window are the same, there is a conflict, of course.
User avatar
Oblomov
Posts: 118
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Jan 12th, ’21, 22:34

Marko wrote:
Jan 12th, ’21, 21:19
If both, Shortcut and Window are the same, there is a conflict, of course.
Gotcha! Really too bad that you can't some sort of a boundary for this, but oh well...
User avatar
Marko
Posts: 1258
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Jan 12th, ’21, 23:28

Sorry, I don't get it - what's the idea? Please give me an example. :)
User avatar
Oblomov
Posts: 118
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Jan 15th, ’21, 21:51

Marko wrote:
Jan 12th, ’21, 23:28
Sorry, I don't get it - what's the idea? Please give me an examples. :)
Sure, sorry, should've included it from the get go...

1. I have a tab that has a PDF file open within it. All such files end with '.pdf' in Chrome.

Image

Here, I have a simple key that I use for it, in order to select the page field, inside of Chrome's PDF viewer. This key has '.pdf', inside of the 'Window' field of FK

2. Now, I also use a website that converts a PDF file to images, here, I also use the same simple key. I basically use this key for most simple/initial tasks, inside of things that have unique window display information...

This website's window display information is 'PDF to Image – Convert PDF to JPG Online', I just realized that I could stick to something like 'to Image – Convert' instead of what I had before, which included the 'PDF' term and therefore conflicted with the shortcut for the opened PDF file, but yeah... I'm thinking in future, one could certainly come across something like this once more... *scratches head*
User avatar
Marko
Posts: 1258
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Jan 16th, ’21, 21:38

The first phrase with ".pdf" window setting already catches all windows which contain "pdf" in the name, therefore also the second one.
The solution is (like you said) to use a different window setting for the second phrase, for example "to image" or similar.
User avatar
Oblomov
Posts: 118
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Jan 17th, ’21, 21:01

Marko wrote:
Jan 16th, ’21, 21:38
The first phrase with ".pdf" window setting already catches all windows which contain "pdf" in the name, therefore also the second one.
The solution is (like you said) to use a different window setting for the second phrase, for example "to image" or similar.
Yep... would be cool if one could set some sort of a 'match whole word' boundary, but through what I manageed to find, that's not something AHK is capable of... I think
Post Reply