Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR/Help wanted: Exclude programs from executing specific/all libraries #43

Open
Gewerd-Strauss opened this issue Dec 28, 2022 · 5 comments

Comments

@Gewerd-Strauss
Copy link

Hello mslonik,

I am aware that this is a super niche request, thus I'm not expecting you to pick this up yourself. But I'd appreciate a bit of help trying to get this hacked together on my end.
All in all, I'd like to be able to exclude certain windows from executing specific libraries alltogether. As an example, I require both latex and unicode math symbols extremely frequently (as in, within a couple seconds of each other) - and for those cases, having both active/the wrong one active is a huge pain. Currently, I have to manually toggle which libraries are active, which obviously gets really annoying if you have to switch them very frequently.

Thus, I'd like to be able to ban specific (or, in the worst case all) libraries from executing in specific programs, or just the program altogether. I'd appreciate if you could point out if/where one would make the corresponding edits.

Thank you.
Sincerely,
~Gw

@mslonik
Copy link
Owner

mslonik commented Jan 16, 2023

Hello Gewerd-Strauss,

This is easier to do than you expect. Below you'll find a sketch, you to accomplish it.

All you need is to run more than one instance of Hotstrings application. Just download the freshest release. Name one script as e.g. Hotstrings1.ahk, the second as Hotstrings2.ahk. Create separate Libraries subfolders. In each subfolder place Before running both instances prepare separate AutoHotkey script which will define context for both instances according to your liking.

For your information, I run two instances of Hotstrings as some libraries overlap if run from just single instance. Thanks to that I can for example automatize capitalization of letters when new sentence is started.

I hope it will help you resolve your issue.

By the way I didn't notice any upload of your libraries to free libraries repository ever (https://github.com/mslonik/Hotstrings-Libraries). I'd appreciate to spread the word about this application too.

Kind regards, mslonik (🐘)

@Gewerd-Strauss
Copy link
Author

Gewerd-Strauss commented Jan 24, 2023

Hello mslonik,

First of, thank you for your reply. I'll try and take a closer look at this in about two weeks, currently I am bogged down with university hell week coming up and my rent contract ending at the same time, so I unfortunately have absolutely zero time to start on this right now.

Sincerely,
~Gw

@AstudilloMarillo
Copy link

Not sure if this is similar or not to the original question: I like to keep this type of program running in the background all the time, I have multiple AHK scripts running at all times and I don't want to micromanage them and exit/start-up one or the other depending on the circumstances. So I'd like to be able to automatically temporarily disable Hotstrings all together when I'm playing games. A way to add an "ignored windows/applications" list would be great.

@Gewerd-Strauss
Copy link
Author

@AstudilloMarillo you can suspend the application from the tray-menu. This will disable all hotstring triggers, however the tooltip will still show up as you go. That might solve your issue.

If this does not fulfill your needs, I believe the simplest alternative is to kill the script during game-sessions.
In principal, you could even write a simple script that waits in the background until <a game> was launched, and then kills the script for you. Similarly, it could restart the script once no game is running anymore (or even when tabbing out, but I think that might be excessive).

@AstudilloMarillo
Copy link

Yes, I could try to write a solution myself. But I'd like to suggest this as a feature request to incorporate it into Hotstrings. To be able to set applications that automatically suspend all hotstrings/triggers/tooltips whenever that application is active. I use quite a few other applications that have similar functionality (for example: StrokesPlus, tinySpell, AltSnap, AutoHotPie), so I don't think it's a niche or farfetched feature request. They all suspend based on executable name (e.g. notepad.exe). I can make a separate issue for my specific request if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants