Skip to content
⌘ NSIS Forum Archive

Open html in custom page

3 posts

rxs2k5#

Open html in custom page

Hi pros,

I read a couple of tutorial in there one is about this plugin by joel
Here

One thing I am unable to view the examples when I run the example for Modern UI

This is an error that came out from the example script by joel.
SetCompressor: /FINAL lzma
Processing config:
!define: "MUI_INSERT_NSISCONF"=""

Changing directory to: "C:\Program Files\NSIS\Examples"

Processing script file: "C:\Program Files\NSIS\Examples\nsWeb - Modern UI.nsi"
!include: "C:\Program Files\NSIS\Include\MUI.nsh"
!include: "C:\Program Files\NSIS\Contrib\Modern UI\System.nsh"
NSIS Modern User Interface version 1.74 - © 2002-2006 Joost Verburg (C:\Program Files\NSIS\Contrib\Modern UI\System.nsh:11)
!define: "MUI_VERBOSE"="3"
!include: closed: "C:\Program Files\NSIS\Contrib\Modern UI\System.nsh"
!include: closed: "C:\Program Files\NSIS\Include\MUI.nsh"
Name: "nsWeb"
OutFile: "nsWeb-MUI.exe"
InstallDir: "$EXEDIR"
ShowInstDetails: show
XPStyle: on
!insertmacro: MUI_PAGE_DIRECTORY
!insertmacro: end of MUI_PAGE_DIRECTORY
Page: custom (creator:ShowWebControl) (caption🙂
Page: custom (creator:ShowHTMLControl) (caption🙂
Page: custom (creator:ShowHTMLText) (caption🙂
!define: "MUI_PAGE_CUSTOMFUNCTION_SHOW"="ShowPopURL"
!insertmacro: MUI_PAGE_COMPONENTS
!insertmacro: end of MUI_PAGE_COMPONENTS
!insertmacro: MUI_PAGE_INSTFILES
!insertmacro: end of MUI_PAGE_INSTFILES
!insertmacro: MUI_LANGUAGE
!insertmacro: end of MUI_LANGUAGE
Function: ".onInit"
InitPluginsDir
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
/oname=outfile one_file_only)
Error in script "C:\Program Files\NSIS\Examples\nsWeb - Modern UI.nsi" on line 25 -- aborting creation process
I am trying to use these function
Function "ShowHTMLControl"
!insertmacro MUI_HEADER_TEXT "Testing nsWeb plugin" "You are watching file1.htm"
nsWeb::ShowWebInPage "$PLUGINSDIR\file1.htm"
FunctionEnd

Function "ShowHTMLText"
!insertmacro MUI_HEADER_TEXT "Testing nsWeb plugin" "You are watching plain HTML text"
nsWeb::ShowHTMLInPage "<b>I'm a <u>HTML text</u></b>"
FunctionEnd
but unable to success due to I still do not understand how could this be done.

any help is appreciated
CancerFace#
I edited Joel's .onInit and it compiled on my PC:
Function .onInit
InitPluginsDir
# Drop everything into the $PLUGINSDIR on init.
# For quick calling at its time
File /oname=$PLUGINSDIR\nsWeb.dll "${NSISDIR}\Plugins\nsWeb.dll"
File /oname=$PLUGINSDIR\file1.htm "file1.htm"
File /oname=$PLUGINSDIR\file2.htm "file2.htm"
FunctionEnd
Use "" around the filenames and it works
CF
rxs2k5#
thanks alot CancerFace

Could I pop in more questions if you do not mind

1. Is there a way to resize the popup html windows??
2. is there any limitations to this because I do not see any information about it.