eugenesvk / Win.ahk

Windows extensions written in AutoHotkey automation scripting language
MIT License
8 stars 1 forks source link

Auto Hide Cursor have issues with variables #1

Closed sambot closed 7 months ago

sambot commented 7 months ago

Hi. I'm having trouble running the autohide cursor while typing. I'm getting a series of errors regarding variables that do not have values. It might be a problem on my end as I'm a AHK novice.

Would you be able to package the script into a self contained executable? I've seen other script developers do that and it makes running a scripts so much easier for AHK novices like me.

Thanks in advance!

eugenesvk commented 7 months ago

Try the latest version, it adds the missing library updates that spawned those warnings

Would you be able to package the script into a self contained executable? I've seen other script developers do that and it makes running a scripts so much easier for AHK novices like me.

Agree it'd be simpler for the users, but harder for me, so that's unfortunately unlikely: this would make the standalone self-contained exe versions of the scripts deviate even more from the way I use these scripts myself in the combo version, so it'd be harder for me to update on changes.

This bug is an illustration of this - I've updated the libraries, but then not fully synced the changes to each of the standalone versions.

Another example: currently all config values are embedded in the scripts themselves, which is rather flexible, and is how I config my own versions. To allow self-contanied exe versions also edit configs would mean those settings will have to be moved away from the scripts into some extra settings file (a more user-friendly GUI alternative would be even better), but this adds yet another complication on updates (though it's a better design since script updates don't override user configs).

sambot commented 7 months ago

Thanks! I downloaded the most recent version and ran it. I prompted me to download an alpha version (I forget which version exactly, 2.1 alpha 4, maybe?), which I did. And when I ran the "🖰hide on 🖮" script, I got the following errors:

Screenshot 2024-01-11 180923 Screenshot 2024-01-11 180957 Screenshot 2024-01-11 181006

Any ideas?

eugenesvk commented 7 months ago

Oh, I see, you're using the combo version, it's not meant to be usable by launching individual sub-scripts

For that I've created more user friendly cleaned up standalone versions, see this https://github.com/eugenesvk/Win.ahk/tree/mhide_kbd, it also has installation instructions, so click on 🖰hide on 🖮_launch.ahk

(or download the latest release of the standalone verison from here https://github.com/eugenesvk/Win.ahk/releases/tag/0.0.2-mhide)

This one also doesn't require the alpha 2.1 version

sambot commented 7 months ago

Ah. Ok. I'm new to this whole AHK thing (and Windows too!).

So I fumbled around a bit with the links you sent, and finally got it working... thanks! Both versions still required me to install 2.1 alpha 4. Is that just user error on my end?

I'm still not exactly sure what the difference is between those two links you provided. Both are standalone versions, yes? Is one a newer release? I just want to make sure I'm running the correct script.

In any case, what I got working, works well! And now I can keep my mouse cursor set to a larger size without it getting all blurry! Huge improvement over the original. I did notice, however, that it only works in certain areas. Take Edge, for example: while I'm typing this message on the GitHub webpage, it works great! But if I move into the address bar and start typing, the mouse cursor remains visible. Am I doing something wrong? Or is that a known thing?

Thanks so much for your work on this and for helping me get it up and running!

eugenesvk commented 7 months ago

Both versions still required me to install 2.1 alpha 4. Is that just user error on my end?

No, another example of me forgetting to fully update this standalone versions, check the updated version here https://github.com/eugenesvk/Win.ahk/tree/mhide_kbd

I'm still not exactly sure what the difference is between those two links you provided.

the difference is that the first link leads to a web page, the other directly to a zip file, but otherwise the content was identical. Now the non-release link above is newer

it only works in certain areas.

Yes, unfortunatly this uses a roundabout accessibility way from another library to detect whether an editable text field is active or not, which isn't 100% reliable. If you don't care about false positives, you could disable limit2text and hide on any key presses regardless of the text fields. But otherwise I don't know how to fix those issues

sambot commented 7 months ago

Got it! Again, many thanks for your explanations here.

eugenesvk commented 5 months ago

Try the newer version https://github.com/eugenesvk/Win.ahk/releases/tag/0.0.3-mhide

For me it resolved the address bar not being recognized as a text input field in a Chormium browser, maybe would also work for Edge

sambot commented 5 months ago

Yes! It works! Thanks for the update.