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

Tooltip instantly closes #2

Open
llwt opened this issue Jun 19, 2015 · 12 comments
Open

Tooltip instantly closes #2

llwt opened this issue Jun 19, 2015 · 12 comments

Comments

@llwt
Copy link

llwt commented Jun 19, 2015

Not sure what's going on but when I press "ctrl+c" the tooltip flashes for a second and then instantly closes.
Someone left a Disqus comment on the homepage reporting the same issue so I don't think it's just isolated to my system.

Let me know if I can provide you with anymore information you need to debug this.

@llwt
Copy link
Author

llwt commented Jun 19, 2015

I found a fix in a forum post from another community member:

gastank wrote:

Figured out another workaround that seems to restore full functionality - I'm not versed at all in AHK >scripts nor the ins and out of Windows, so no guarantees on whether this breaks anything.

Open POE-ItemInfo.ahk, find the section "ShowToolTip(String)" around line #5475.

Find the line "ToolTip, %String%, X - 135, Y + 35" and add additional lines so it reads:

ToolTip, %String%, X - 135, Y + 35
Fonts.SetFixedFont()
ToolTip, %String%, X - 135, Y + 35

Find the line "ToolTip, %String%, XCoord, YCoord" and add additional lines so it reads:

ToolTip, %String%, XCoord, YCoord
Fonts.SetFixedFont()
ToolTip, %String%, XCoord, YCoord

Find the line "Fonts.SetFixedFont()" and add a semicolon in front so it reads:

;Fonts.SetFixedFont()

@iteminfo
Copy link

same Problem ....fix dont work 4 me :///

@Tvangeste
Copy link

I have updated my Windows 7 to the latest state (via Windows Update), and this broke the script for me as well. I assume some Windows 8-10 compatibility tweaks made it so the tooltip immediately closes.

Essentially, the line that causes the tooltip to close is (around line 350 or so):

SendMessage, 0x30, NewFont, 1,, ahk_class tooltips_class32 ahk_exe %AhkExe%

So the WM_SETFONT message causes the tooltip to start hiding.

It would be really nice to find out the proper fix for that, since all the workarounds that we have at the moment are just disabling setting the custom font, making the tooltip hard to read and using non-fixed font (which breaks the formatting in ugly ways).

Thanks you for you efforts!

@Tvangeste
Copy link

Oh, actually, the workaround proposed by @llwt indeed does work for me just fine. THANK YOU!

@andreberg
Copy link
Owner

Thanks for that workaround.

Indeed it seems at quick glance AutoHotkey SendMessage facility is having trouble with a recent Windows update. I do not know at this point what the underlying issue is (could be security related or something with SendMessage bindings to the underlying WinAPI).

Without more info I am guessing a proper fix (that retains the fixed font for a nice tooltip layout) will be a bit more involved. For now of course the workaround should circumvent the problem with SendMessage but you will have the default tooltip font instead then (which is proportional and not fixed).

I hear that compiling the script retains a fully functional SendMessage mechanism suggesting the underlying issue might be security related.

Unfortunately I do not have the time to look into it atm with exam prep time at uni. It will be a couple weeks at least until I get to it.

@Tvangeste
Copy link

Actually, that's the beauty of the workaround proposed by @llwt, the font does change properly!

@Tvangeste
Copy link

André, please merge the pull request, it resolved the problem.

@andreberg
Copy link
Owner

Will do so this weekend. Have exam tomorrow at 8 am and Friday as well. Just wanted to let you guys know I am aware of the pull requests :)

@GeminiEngine
Copy link

I wish I knew more about AHK scripts. I can say that on Windows 8.1, line 5503 can be commented out (function call "Fonts.SetFixedFont()") and the script functions as desired but without aesthetic formatting.

I reviewed some MS developer knowledge base and found the following. "https://msdn.microsoft.com/en-us/library/windows/desktop/ms632642%28v=vs.85%29.aspx". It governs font control for toolTips and other controls. I tried to find something in your script related to this but did not. I believe using this to set the font type to "Courier New" or some other monospaced font will restore aesthetics.

OH and a THANK YOU so much for your time on this project.

@Tvangeste
Copy link

@GeminiEngine, but that's the whole point to show the tooltip and show it
nicely formatted (otherwise the table-like information will be rather hard
to read without fixed font).

On Fri, Jul 31, 2015 at 7:47 AM, GeminiEngine notifications@github.com
wrote:

I wish I knew more about AHK scripts. I can say that on Windows 8.1, line
5503 can be commented out (function call "Fonts.SetFixedFont()") and the
script functions as desired but without aesthetic formatting.

I reviewed some MS developer knowledge base and found the following. "
https://msdn.microsoft.com/en-us/library/windows/desktop/ms632642%28v=vs.85%29.aspx".
It governs font control for toolTips and other controls. I tried to find
something in your script related to this but did not. I believe using this
to set the font type to "Courier New" or some other monospaced font will
restore aesthetics.

OH and a THANK YOU so much for your time on this project.


Reply to this email directly or view it on GitHub
#2 (comment)
.

@GeminiEngine
Copy link

Reading is doable-ish, however at least on my Windows 8.1 it does not fix the font for me.

@cark
Copy link

cark commented Aug 1, 2015

llwt's fix worked for me on win10 x64

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

6 participants