HelpButton plug-in

From NSIS Wiki
(Redirected from Help Support Plugin)
Jump to navigationJump to search
Author: DrO (talk, contrib)


Links

Zip.gif Helpbutton_v0_9.zip (73 KB)
Zip.gif Helpbutton_v0_9.zip (73 KB) (Mirror #2)

Forums Topic

Description

Version: 0.9

Now you can have help support at the click of a button or a press of the key. This plugin will allow you to click on customisable button or to press the 'F1' key to open a information window which you decide what it is that you will show.

You can view plain text, rich text or html (support is basic at the moment) and you can use files to store the information in (ideal for rich text and html!).

The current features are:

  • add a button onto a page where you want it to go (resizes to the text)
  • define your own button text e.g. "Help" or "Readme..." or hide it if you want
  • show text you set in the script or use a file
  • support for plain text, rich text and not forgetting html files
  • opens the information when pressing 'F1'
  • works on a per page method and it is possible to get a button shown after installation has happened :o)

Syntax

::show /NOUNLOAD (x, y) button_text window_title window_text [option1 option2]
/NOUNLOAD
please note that THIS IS NEEDED otherwise the installer is likely to crash or the button will not work or be correctly removed! (This is due to the way the button is implemented, a work around was possible but when run under NT4 the plugin would crash.)
(x, y)
this sets the top left corner of the button with respect to the installer's top left corner
button_text
this is the text that is displayed on the button with the button resizing to allow it to correctly appear. if no text is passed in then the button will be hidden
window_title
this is what the information window will display
window_text
this the text that the window will show which can be text in the script or using /file= or /html= can specify a file to be used (full path to the file)
option1 and option2
if using text files or text in the script then there are two optional settings currently available
wrap
this will turn wordwrapping of the window on (default is off)
font
if using plain text then this sets the font size to use (currently the installer's font is used for the window text) (default is the current installer font size)
::end

this takes no parameters and MUST be used once you have finished using the feature on your page or the best option is when the installer exits and is best to use .onGUIend (or the MUI eqivalent).

If you don't do this then it is unlikely that the installer will crash but the dll will not be unloaded and so will stay on the hard drive which is not friendly to the person using the installer ;o)

TODO List

  • better / tidier example of the code
  • better control over the font to use with text files
  • other suggestions :o)