BeautifulToolTip, short as BTT.
Why do i rewrite a ToolTip? Because the following 4 problems are really annoying.
- Blinking
- Display in the wrong place
- Text is difficult to align
- Hard to get information such as size before display
BTT is designed to completely replace ToolTip, so it is fully compatible with ToolTip's syntax and settings.
- Show a message
Code: Select all
btt("This is BeautifulToolTip")
- Clear it
Code: Select all
btt()
- Specify x,y and WhichToolTip
Code: Select all
btt("This is BeautifulToolTip`n`nWhichToolTip = 2",500,500,2)
Sleep, 5000
btt(,,,2)
- The CoordMode command also works with BTT
Code: Select all
CoordMode, ToolTip, Screen
btt("This is BeautifulToolTip")
Sleep, 5000
btt()
BTT has several built-in styles that are still easy to use.
- Use the built-in styles "Style1"
Code: Select all
btt("This is BeautifulToolTip",,,, "Style1")
- More built-in styles
- Customizing styles is also very easy, just change the template parameters!
Code: Select all
#SingleInstance Force
SetBatchLines, -1
Text=
(
使用模板可以轻松创建自己的风格。
欢迎分享,带张截图!!!
Use template to easily create your own style.
Please share your custom style and include a screenshot.
It will help a lot of people.
)
; You can put your own style in btt() function, then you can use your own style in anywhere.
; All supported parameters are listed below. All parameters can be omitted.
; Please share your custom style and include a screenshot. It will help a lot of people.
; Attention:
; Color => ARGB => Alpha Red Green Blue => 0x ff aa bb cc => 0xffaabbcc
Template := {Border:20 ; If omitted, 1 will be used. Range 0-20.
, Rounded:30 ; If omitted, 3 will be used. Range 0-30.
, Margin:30 ; If omitted, 5 will be used. Range 0-30.
, TabStops:[50, 80, 100] ; If omitted, [50] will be used. This value must be an array.
, BorderColor:0xffaabbcc ; ARGB
, BorderColorLinearGradientStart:0xff16a085 ; ARGB
, BorderColorLinearGradientEnd:0xfff4d03f ; ARGB
, BorderColorLinearGradientAngle:45 ; Mode=8 Angle 0(L to R) 90(U to D) 180(R to L) 270(D to U)
, BorderColorLinearGradientMode:1 ; Mode=4 Angle 0(L to R) 90(D to U), Range 1-8.
, TextColor:0xff112233 ; ARGB
, TextColorLinearGradientStart:0xff00416a ; ARGB
, TextColorLinearGradientEnd:0xffe4e5e6 ; ARGB
, TextColorLinearGradientAngle:90 ; Mode=8 Angle 0(L to R) 90(U to D) 180(R to L) 270(D to U)
, TextColorLinearGradientMode:1 ; Mode=4 Angle 0(L to R) 90(D to U), Range 1-8.
, BackgroundColor:0xff778899 ; ARGB
, BackgroundColorLinearGradientStart:0xff8DA5D3 ; ARGB
, BackgroundColorLinearGradientEnd:0xffF4CFC9 ; ARGB
, BackgroundColorLinearGradientAngle:135 ; Mode=8 Angle 0(L to R) 90(U to D) 180(R to L) 270(D to U)
, BackgroundColorLinearGradientMode:1 ; Mode=4 Angle 0(L to R) 90(D to U), Range 1-8.
, Font:"Font Name" ; If omitted, ToolTip's Font will be used. Can specify the font file.
, FontSize:20 ; If omitted, 12 will be used.
, FontRender:5 ; If omitted, 5 will be used. Range 0-5.
, FontStyle:"Regular Bold Italic BoldItalic Underline Strikeout"}
; Same as Style7
OwnStyle1 := {Border:20
, Rounded:30
, Margin:30
, BorderColor:0xffaabbcc
, TextColor:0xff112233
, BackgroundColorLinearGradientStart:0xffF4CFC9
, BackgroundColorLinearGradientEnd:0xff8DA5D3
, BackgroundColorLinearGradientAngle:0
, BackgroundColorLinearGradientMode:8
, FontStyle:"BoldItalic Underline"}
btt(Text,,,,OwnStyle1)
Sleep,10000
ExitApp
By setting the options of BTT, effects can be easily implement.
- Fadein
Code: Select all
for k, v in [15,35,55,75,95,115,135,155,175,195,215,235,255]
{
btt(Text,,,,"Style7",{Transparent:v})
Sleep, 30
}
- Fadeout
Code: Select all
for k, v in [240,220,200,180,160,140,120,100,80,60,40,20,0]
{
btt(Text,,,,"Style7",{Transparent:v})
Sleep, 30
}
- Dynamic color change
- Follow the window
Code: Select all
btt(Text,800-1,600-1,,"Style1",{TargetHWND:target})
- Calculate size
Code: Select all
ret := btt("test",,,,,{JustCalculateSize:1})
MsgBox, % "width:" ret.w " high:" ret.h
BTT also implements
- Multi-monitor support
- Multi-DPI support
But i won't demonstrate them here, see the packaged examples or the instructions in the source code for yourself.
Finally, with many new features, and without the annoying problems of ToolTip.
BTT's performance still 2-1000 times faster than the ToolTip !!!!!!
- ToolTip CPU usage
- BTT CPU usage
- Elapsed time comparison
BTT has been supported and inspired by the following projects
jballi's Fnt lib
robodesign's Gdip_all lib
iPhilip's FFToolTip
just me's MDMF lib
just me's ImageButton
skan's OSDTIP
Now I think you have no more reason to use tooltip, come with BTT, and show me your own style!!!
Download
https://github.com/telppa/BeautifulToolTip/releases