plul / Public-AutoHotKey-Scripts

For sharing some of my AutoHotKey example scripts
MIT License
259 stars 57 forks source link

Fix "?" for Win10 #1

Closed mischmiko closed 8 years ago

mischmiko commented 8 years ago

Fixed "? command. I am not exactly sure why this line is necessary, but it obviously immediately hides the tooltip in Win10.

mischmiko commented 8 years ago

Please also see here for a small enhancement: Filter out commented commands.

plul commented 8 years ago

Hi schmimae!

I merged your suggestions. Thanks a lot!

The last 4 lines were supposed to change the tooltip to a monospace font, and apparently the one you commented was causing a bug on Win10. One of those lines is of course needed there at the end to actually display the tooltip, even after giving up on a monospace font.

On the other hand you had a line which confused me in the middle of your loop:

This line does not do what you think it does, so I just wanted to give you a heads up. It does nothing except actually setting the text "A_LoopReadLine" on the tooltip. The text on the tooltip should be rendered at the very end however.

Again, thanks for your interest!

It doesn't look as nice now without the monospace font however. I'm wondering if it would be possible to simply integrate it all into the dark GUI, with a scroll bar. Maybe I will take a look at that sometime.

mischmiko commented 8 years ago

Hi Asger,

yes, you are right - we lost monospace, which will look ugly, but at least it works. The line "Tooltip A_LoopReadLine, 3,3,1" was indeed only for me - I tested some things as I was new to AHK :). However, I made some other enhancements (see my fork). Feel free to add any of those to your master repo. I am not good at merging changes ;-)

  1. Added dynamic list of matching commands (I like it if there is only one command left, that this one gets executed automatically - might not be for everyone) - to test, just type "d"
  2. Added IP address
  3. Added a systray icon (made it myself, so no worries about copyright)
  4. Changed uriEncode() function, as the old one did not always work
  5. Slight visual change for text input (e.g. Google)
  6. Do not display commented cmds in the ?-tooltip
  7. Added/changes some commands, e.g. a. New command for calculations (e.g. 1+1) (using Calculator.ahk) b. New command to change sound output device c. New command to pause/resume Google Music or similar d. New command to change my Microsoft Lync status e. New command to open Windows Update f. etc.

I have seen that you made some other changes, especially for searching multiple URLs and some cleanup stuff. I did not add those changes, so you might see some differences.

Michael

Sent from my Windows Phone


From: Asger Juul Brunshøjmailto:notifications@github.com Sent: ‎30.‎12.‎2015 21:17 To: plul/Public-AutoHotKey-Scriptsmailto:Public-AutoHotKey-Scripts@noreply.github.com Cc: Schmidt-Korth, Michael ST/HZA-ZADmailto:michael.schmidt-korth@schaeffler.com Subject: Re: [Public-AutoHotKey-Scripts] Fix "?" for Win10 (#1)

Hi schmimae!

I merged your suggestions. Thanks a lot!

The last 4 lines were supposed to change the tooltip to a monospace font, and apparently the one you commented was causing a bug on Win10. One of those lines is of course needed there at the end to actually display the tooltip, even after giving up on a monospace font.

On the other hand you had a line which confused me in the middle of your loop:

This line does not do what you think it does, so I just wanted to give you a heads up. It does nothing except actually setting the text "A_LoopReadLine" on the tooltip. The text on the tooltip should be rendered at the very end however.

Again, thanks for your interest!

It doesn't look as nice now without the monospace font however. I'm wondering if it would be possible to simply integrate it all into the dark GUI, with a scroll bar. Maybe I will take a look at that sometime.

— Reply to this email directly or view it on GitHubhttps://github.com/plul/Public-AutoHotKey-Scripts/pull/1#issuecomment-168067419.

plul commented 8 years ago

Nice! I took a quick look through your commits. I will delve more into it when I have time. My immediate favourite change is the simple else gui_destroy() for the hotstring that activates the GUI. On some occasions the GUI loses focus (when the user accidentally activates another window by clicking on it or alt-tabbing), and then it becomes necessary to refocus the GUI with the mouse. But this makes it easy to destroy it and start over.

The calculator and dynamic display of hotkeys are nice additions. I will try to integrate those soon.

And thanks for the icon! It was about time it got its own icon!

I have always preferred to auto-fire the hotkeys instead of waiting for the user to press Enter, but damn, I must say, you took it to the extreme by firing not fully typed hotkeys. :D That might be too aggressive for me, and actually I have been wondering whether I should go in the other direction and require an Enter as I was worried that new users would find the auto-firing off-putting.

I have some functionality that I want to introduce on my todo list, and I am planning on cleaning it up quite a bit too and structuring it differently in the near future.

As always, thanks for your interest in this script! :)

mischmiko commented 8 years ago

Yeah, absolutely - firing even incomplete commands will for sure confuse new users! Maybe it can be implemented as a simple switch in the script for users who are used to their commands.

I am also pretty sure that some of my changes can be optimized.

I will definitely watch out for new additions :)

Sent from my Windows Phone


From: Asger Juul Brunshøjmailto:notifications@github.com Sent: ‎04.‎01.‎2016 01:07 To: plul/Public-AutoHotKey-Scriptsmailto:Public-AutoHotKey-Scripts@noreply.github.com Cc: Schmidt-Korth, Michael ST/HZA-ZADmailto:michael.schmidt-korth@schaeffler.com Subject: Re: [Public-AutoHotKey-Scripts] Fix "?" for Win10 (#1)

Nice! I took a quick look through your commits. I will delve more into it when I have time. My immediate favourite change is the simple else gui_destroy() for the hotstring that activates the GUI. On some occasions the GUI loses focus (when the user accidentally activates another window by clicking on it or alt-tabbing), and then it becomes necessary to refocus the GUI with the mouse. But this makes it easy to destroy it and start over.

The calculator and dynamic display of hotkeys are nice additions. I will try to integrate those soon.

And thanks for the icon! It was about time it got its own icon!

I have always preferred to auto-fire the hotkeys instead of waiting for the user to press Enter, but damn, I must say, you took it to the extreme by firing not fully typed hotkeys. :D That might be too aggressive for me, and actually I have been wondering whether I should go in the other direction and require an Enter as I was worried that new users would find the auto-firing off-putting.

I have some functionality that I want to introduce on my todo list, and I am planning on cleaning it up quite a bit too and structuring it differently in the near future.

As always, thanks for your interest in this script! :)

— Reply to this email directly or view it on GitHubhttps://github.com/plul/Public-AutoHotKey-Scripts/pull/1#issuecomment-168556844.