What should I write a beginning of the code lines, for code to be running only in a window with a specific title which may contain some specific words?
In v1 we had #IfWinActive , and it's been working great.
Now, in v2 it's disabled.
Code should be working only in a window with a specific title Topic is solved
Re: Code should be working only in a window with a specific title Topic is solved
It's similar to #If in AHK v1 - but it's now renamed to #HotIf.
See #HotIf and WinActive().
Also https://www.autohotkey.com/docs/v2/Tutorial.htm#s22
See #HotIf and WinActive().
Also https://www.autohotkey.com/docs/v2/Tutorial.htm#s22
Re: Code should be working only in a window with a specific title
Thanks, it works fine.
As I understood, for some specific hotkeys like "Reload" and some others - I should simply write right before them a simple #HotIf without anything else.
As I understood, for some specific hotkeys like "Reload" and some others - I should simply write right before them a simple #HotIf without anything else.
Re: Code should be working only in a window with a specific title
No, not really for specific but for general hotkeys, in order to end a section in which you defined contex-sensitive hotkeys or hotstrings.
I could imagine that Reload could be used in both general and context-sensitve hotkeys... it depends on your goal and use case, imo.
That's the same like using a simple #IfWinActive or #If without anything else in v1 - in v2, it also works positional.To turn off context sensitivity, specify #HotIf without any expression.
I could imagine that Reload could be used in both general and context-sensitve hotkeys... it depends on your goal and use case, imo.
Who is online
Users browsing this forum: DavidP, FanaticGuru, Noesis, TomDonovan and 104 guests