IMHO, most often we don't provide enough help for our apps. Maybe it is because we usually wait until the app is complete, then we don't want to take the time. We probably also assume that people using them will understand.
I came up with this very simple system, for GUI's, wherein the context help is written right along with the addition of controls. Using it means you don't have to worry over it later.
Also provided, is what is, again imho, a better alternative than SetTimer, and guessing how long it will take someone to read something, for ToolTips.
The user just right-clicks anywhere in a GUI for an appropriate tooltip, and upon left-clicking anywhere on the screen, the tooltip disappears. Or a subsequent right-click without the 'WhichToolTip' parameter seems to clear a tooltip and display thenew, appropriate one, built into AHK already.
I'm not at all sure this hasn't been done by someone else before, or that there isn't a problem with it somewhere. You'd need to check OS version as it hooks the mouse. Also, an actual context MENU could be set up if a_guicontrol = null (clicked on gui background).
Code:
#SingleInstance force
;====== This is just an example gui with 'built-in' help.
Gui, Add, GroupBox, x6 y20 w200 r8 vgb1, Test
Gui, Add, CheckBox, xp+6 yp+20 vcb1, Another Test
cb1help = Left-click here to see a very nice check mark.`nIf you get tired of it
, just click again and it will go away.
Gui, Add, radio, vrb1, <---- Radio Button 1
rb1help = Click this big empty circle and it won't be empty any longer.
Gui, Add, DDL, yp+60 vMyDDL, Choose Please||red|blue|green|purple|yellow|orange
MyDDLhelp = Click this box, then click on your favorite color.
Gui, Add, Button, Default vBtnExit gClose yp+60, E&xit
BtnExitHelp = Click to close the program.
Gui, Show, , Helpful
guihelp = This is the Main Window
return
Close:
ExitApp
;======== AHK's built-in GUI right-click label
GuiContextMenu:
{
If a_GuiControl =
help = This is the Main Window
help := %a_GuiControl%help
ToolTipMon()
ToolTip, %help%
return
}
;======== and the tooltip monitor, which turns off tooltips the
;======== next time the user left-clicks. The splat might best
;======== be omitted.
ToolTipMon()
{
HotKey, *~LButton, KillTip
HotKey, *~LButton, On
return
KillTip:
{
HotKey, *~LButton, Off
ToolTip
return
}
}
_________________
When it comes to Binary, there are 10 types of people. Those who get it and those who don't.
