Archive: help button for pages needed


help button for pages needed
Hello,

it could be very helpful to add a 'help' button to each installation page with a user defined text. so all addditional infos could be placed in this text box. This help text must be opened by clicking on the button or pressing F1.

Or it's already possible? How?

regards
norial


You would have to modify the source code.

Usually the page text should give enough information, seperate help pages are not that user friendly.


why not?

there is only place for a short text. and why additional info are not that user friendly?
normally noboby reads this text (normally reads any installastion text and klick only 'next') but sometimes a user needs a explination of some words or options.

regards
/norial


You can do it with a plug-in too, but there is currently no way to do it just by script.


is any plugin available which insert a help/extra button in pages?


Not that I know of, you'd have to write one.


is this the sort of thing you're looking for?

it is very basic (no config and a hacked around example) at the moment but if you click on the button or press f1 then a little window will pop up. if the 'info' window is already open then it will be brought back to be active again.

still working on how best to implement the setting of the button onto the pages and it's interacting with the running installer.

note 1: the installer will hang if you press f1 with a messagebox open at the moment (not sure if i'm handling messages, etc correctly)

note 2: if the info window is open when the installer is closed then it likely to cause a crash

note 3: not all parts of the button will react at the moment due to it overlapping other controls on the dialog

basically this is just a test to see if it'll work and to check how the handling of the nsis window works for such a feature

-daz


Hello daz,

Originally posted by DrO
[B]is this the sort of thing you're looking for?
it's exactly what I need. Is this the first release ? You gave some extra infos about possible problems. Do you like to fix the problems?

I believe there only a few options needed. e.g button text, info text (formated? means normal text an bold or italic text).

thanks for your help

glad i got the correct idea of what you meant ;)

Is this the first release ?
more of a test version to just see how feasible it is to do.

i should have a few more bits done by monday (bit busy with work and things at the moment).

will get it to be configurable but not entirely sure what you mean with the formatted bit.
do you mean the text will be normal or italic or bold
or
(normal and bold) or (normal and italic)?

parameters i'm likely to have for the next release will be:
button_position button_text info_text
e.g.
"0,0" "blah" "information is a killer"

note: "0,0" would put it in the top left corner (may make the button be autosized to the passed text length)

-daz

updated a few bits so that this is now more configurable to use ie font is taken from the installer, button can be repositioned, etc.

problem is that when a page is finished, the installer will crash if the 'end' function is used (don't use for the moment). posting more to see how the font placement, etc works on other systems.

-daz

ps
@the devs: when a page is changed, is the window proc being altered? asking since i can never get the 'end' function to successfully unsubclass the window - seems to be trying to access memory from where the dll was mapped into the address space even though i've restored the original window proc i had :(

thanks


ooops, forgot to attach :cry:


Originally posted by DrO
@the devs: when a page is changed, is the window proc being altered? asking since i can never get the 'end' function to successfully unsubclass the window - seems to be trying to access memory from where the dll was mapped into the address space even though i've restored the original window proc i had :(
There are two window procs, one for the outer dialog and one for the inner dialog. The problem you're having is probably caused by unloading the plug-in in the leave function which is called when processing a windows message. That message is sent to the dialog by no other but your own plug-in. When the control returns to your plug-in's code it's no longer there, and that causes the crash. Sub-classing is so wonderful, don't you think? :)

Sub-classing is so wonderful, don't you think?
i know what you mean ;)

thought that might be the case. with plugins, the hwndParent is the outer dialog (which i'm hoping is right) since that's the one i've been subclassing.

in the code, i have in the start function the plugin using loadlibrary to keep the plugin loaded (removing the need for the /nounload) and then doing the required freelibrary in the end function after it all return values indicate i have unsubclassed the window.

will have a better look at the installer exe source later on i think to see better what's going on

thanks for the info kichik

-daz

finally worked out how to get around the problems with the plugin crashing (window hooks, doh! but no more subclassing :D)

now it is possible to get a button onto any page and fixed the message deadlocks from the initial release when the installer was not the active window (messageboxes, etc). now it will allow the 'f1' to work when a messagebox is open.

will post the latest version soon (need some testing on other systems to make sure that the dll is freed correctly so the plugins directory of the installer can be correctly removed on close)
[would have posted it now but i brought the wrong version with me :eek: )

@kichik - the info was much appreciated :) found the message id for a page change which makes it able to automatically unhook a page without calling other functions, cheers for the pointer

-daz


latest version attached (check the example script on how to use)

works on 2k and 98 (just ran on the work machine and it crashes - NT4 :()

can people please test so i can get an idea of what is / isn't wrong with the code, thanks

-daz


attached is a test version of the dll, can people with NT systems test it please

it will put up messageboxes to show where in the startup process things are (also will beep when the dll is loaded and unloaded).

tried it on a NT test machine and now it does not crash but on loading it will cause the installer to exit immediately
(wierd how all other oses i've tried the code on work fine :weird: )

thanks
-daz

p.s. the code shown will cope with reading text and rtf files now by using /file=blah.rtf in the window text parameter (see earlier posts for an example script) and i'm working on html display.
just a pain that it's not running correctly with NT :(


a few versions later and now the NT4 issue is fixed :) (see below for reason)

i'm putting the updated version up in a bit after i get a readme on how to use it done.

overall features are:[list=1][*]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..."[*]show text you set in the script or use a file[*]support for plain text and rich text files[*]basic support of showing a html file (still need to correctly embed the window)[*]opens the window when pressing 'F1'[/list=1]the reasons for the crashing under NT4 where related to trying to hook the window in the dll which it doesn't seem to like doing when the hook function is in the dll calling it (though it works fine under all other oses tested :hang: ).

the reason for this was trying to drop the need for a /NOUNLOAD to be used for all calls but i guess it wasn't meant to be :rolleyes:

now i've gone back to a hybrid of the earlier code which just subclasses BUT i've improved the handling so it will now cope with the 'show' function being called in the page's leave function (useful for getting a button shown once the install has completed :cool: )

-daz


new release, mmmmm tasty
attached is the latest version :) (both the dll and an example installer with it in use)

see above for what it can do and check out the example for an idea of how to use the plugin.

more info will be available soon (proper readme file and also an archive page -> off to do that now)

-daz

[edit]
now in the archive here so check it out for how to use the plugin :cool:
[/edit]


Good work!!!

-Stu :D


Great, good job :)

But why is there no source code? :(

BTW, you can link directly to the attachment from the Archive, no need to link to the thread itself.


Originally posted by kichik
But why is there no source code? :(
forgot to bring the files with me :( will have it up for the next version + need to make it readable (other than by me ;) )

forgot about a direct link (was trying to get at least something on the archive before leaving work), thanks for the pointer though

-daz

by the power of greyskull....
version 0.9 attached

changes to the plugin are:[list=1][*]fixed a few crash issues with related to string lengths :([*]button is now hidden if no text is passed for the title[*]FULLY integrated webbrowser control (now it acts like the text window :cool: )[*]source code provided for your viewing pleasure[/list=1]the project assumes it is in .\contrib and the plugin will go into .\plugins for those of you interested and the example files are all in there too

-daz


Re: by the power of greyskull....
Hello !

How can I use the Plugin with Modern UI
!insertmacro MUI_PAGE_WELCOME start

Function start
HelpButton::show /NOUNLOAD "246,231" "blah blah blah" "built to the power of the llama ^o^" "/html=$EXEDIR\winampmb.htm"
FunctionEnd

Gives an error: !insertmacro: macro "MUI_PAGE_WELCOME" requires 0 parameter(s), passed 1!

Must I modify system.nsh directly?


u need to define the function in other way:

!define MUI_PAGE_CUSTOMFUNCTION_PRE start
!insertmacro MUI_PAGE_WELCOME
...

It seems there are still several "problems" of this plugin together with the Modern UI:

(1)The button is not displayed the XP styled way.
(2)It seems that every window-refresh unloads the button espeacially a refresh of an InstallOptions-Dialog, so u have to call the HelpButton::show - method at least in every show and leave-function.

Anyway - keep up the good work.
Hope there will be some new versions in the future.

Greez.


there should be a 1.0 out in the next few days which adds in chm support, more control over the positioning of the window (for both the chm window and the one the plugin makes) plus a few other tweaks, etc.

there was the xp issue which may be sorted now as well (not too sure since i still don't have an xp install to run on myself but the last screenshot i got from a recent test build showed the button was xp themed *shrugs*

anyhoo, expect a v1.0 soon :up:

-daz


Originally posted by DrO
there should be a 1.0 out in the next few days which adds in chm support, more control over the positioning of the window (for both the chm window and the one the plugin makes) plus a few other tweaks, etc.

anyhoo, expect a v1.0 soon :up:

-daz
I was looking for just this feature (chm) and I found the 0.9 version, but no 1.0 version.

Any change of getting a 1.0 version ?

thx

Hans

i've been a bit side tracked with work so the 1.0 release is a few days behind. if i can i'll do it sunday night (depends on work and 'real life' giving me the time to sit down and do some coding :) ) otherwise it'll be monday night

-daz


never mind, I can wait.
Sounds much better, 1.0 than 0.9 :)

thx, Hans


Help Support plugin v1.0 RC1

download 1.0 RC1

archive reference page for 0.9 sytnax

main changes are that you can now use /help to use chm files e.g. "/help=${NSISDIR}\nsis.chm"

as well it's now possible to specify the top left corner of the window as "x,y" or center (centers in the middle of the desktop) or centerp (centers in the middle of the installer).

and also the size of the window can be set via "width,height" after the top left corner value.

until it's documented/tweaked any of the new parts not used need to be set as "" in the script where you'd otherwise place the information. depending on feedback, etc i'll potnetially modify this and i will update the help file about this in the next day or so

syntax example:
HelpButton::show /NOUNLOAD "232,231" "?" "" "/help=${NSISDIR}\nsis.chm" "" "" "centerp" "500,500"

this will place a '?' button to the left of one of the 'back' button in a classic UI installer and open the nsis.chm file centered over the installer window and 500x500 pixels in size

-daz


could you please post at least the basic syntax??


Comm@nder21: post editted now ;)

-daz


Two words, absolutely great !

thx for the quick response

Hans


HansH: cool, good to hear it's working for you. i've been trying to get to a 1.0 state with it for almost a year now so it's good to know the updates haven't screwed things up too much :)

-daz


Window size using html
Using version 1.0RC1 (and older) I can't get the html helpwindow large enough. I'm using: HelpButton::show /NOUNLOAD "232,231" "?" "" "/html=xxx.html" "" "" "centerp" "800,800"
It's as if there is a max limit for the window size.
Is it possible to fix?


there shouldn't be a limit with the size (from the plugin side of things). the only thing i can think of is that the html help window enforces a size limit itself but without looking into this i can't say for certain. will try and look at it over the weekend (and update the wiki page as well)

-daz


Has anyone tested this plugin with Windows 7/ Vista and the latest nsis version. 5 Years are a loooong time.
I will give it a try, or are there already any other possibilities to give the user an extra information window? (The user needs to choose between several installing options which can't be explained in the short description box)

The Help Button shows up after 3 seconds, don't know why it takes so long?
Does anyone has a complete documentation for 1.0 or could tell me what's important to set?

The screen size of the html is always the same, can't make it bigger. It's opened on the upper left corner of the desktop.

Function helpCombo
HelpButton::show /NOUNLOAD "300,100" "?" "" "/html=c:\gps\gpsbabel.html" "" "" "centerp" "1024,768"
FunctionEnd


--> should open in the center of the installer window, but it's on upper left coprner of the desktop
--> should be 1024 x 768, but it's only about 150 x 150
--> using MUI2.nsh

Can I insert an html link instead of this help button, so that a browser window is opened? maybe this would be easier?

i've never tested it on Vista/Win7 (no idea if anyone else has) but i don't think i've even got the source code for this anymore (and it'd need a complete re-code anyway to make it compatible with ansi and unicode installers that are now available). however it's been so long since i've done NSIS plug-in coding i don't think i'm going to have the time to make a new version.

as for the size limits it sounds like it's an issue with the plug-in's ability to control the html control (though i had thought it allowed for larger sizes when i'd developed it so maybe something with the IE web browser control has changed, dunno).

you might be able to make a link control with nsDialogs and go that way, am sure i'll be corrected if i'm wrong, heh

-daz


thanks for your quick answer!
Ok, that's good to know. I will try it with nsdialogs or the linker plugin.