From e7274c175736c3bd31107309048bc9894d37a501 Mon Sep 17 00:00:00 2001 From: kichik Date: Tue, 11 Jan 2005 17:16:23 +0000 Subject: [PATCH] applied patch #1098454 with some changes git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3862 212acab6-be3b-0410-9dea-997c60f758d6 --- Docs/src/flowcontrol.but | 20 +++++++++++++++++--- Docs/src/ui.but | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Docs/src/flowcontrol.but b/Docs/src/flowcontrol.but index 089d16de..f390584d 100644 --- a/Docs/src/flowcontrol.but +++ b/Docs/src/flowcontrol.but @@ -11,15 +11,24 @@ Cancels the install, stops execution of script, and displays user_message in the \S2{call} Call -\c function_name | :label_name +\c function_name | :label_name | user_var(input) -Calls the function named function_name. If in the Uninstall section, Call can only be used with function names beginning with "un.". If the parameter starts with a ':' it will be treated as a label (so you can call to a label in your function - this is probably not going to be used most of the time). +Calls the function named \e{function_name}, the label named \e{label_name}, or a variable that specifies an address. An address is returned by \R{getcurrentaddress}{GetCurrentAddress}, \R{getfunctionaddress}{GetFunctionAddress} or \R{getlabeladdress}{GetLabelAddress}. A call returns when it encouters a \R{return}{Return} instruction. Sections and functions are automatically ended with a \R{return}{Return} instruction. Uninstall functions cannot be called from installer functions and sections, and vice-versa. \c Function func -\c DetailPrint "hello world from func" +\c Call :label +\c DetailPrint "#1: This will only appear 1 time." +\c label: +\c DetailPrint "#2: This will appear before and after message #1." +\c Call :.global_label \c FunctionEnd +\c \c Section \c Call func +\c Return +\c +\c .global_label: +\c DetailPrint "#3: The global label was called" \c SectionEnd \S2{clearerrors} ClearErrors @@ -261,6 +270,11 @@ Returns from a function or section. \c Return \c # do stuff \c FunctionEnd +\c +\c Section +\c Call func +\c ;"Return" will return here +\c SectionEnd \S2{quit} Quit diff --git a/Docs/src/ui.but b/Docs/src/ui.but index d7b6db90..970f2a2f 100644 --- a/Docs/src/ui.but +++ b/Docs/src/ui.but @@ -125,7 +125,7 @@ Sets mode at which commands print their status. None has commands be quiet, list \c hwnd [/BRANDING] [text_color] [transparent|bg_color] -Sets a background color and the text color for a static control, edit control, button or a dialog. Use GetDlgItem to get the handle (HWND) of the control. To make the control transparent specify "transparent" as the background color value. You can also specify /BRANDING with or without text color and background color to make the control completely gray (or any other color you choose). This is used by the branding text control in the MUI. +Sets a background color and the text color for a static control, edit control, button or a dialog. \e{text_color} and \e{bg_color} don't accept variables. Use GetDlgItem to get the handle (HWND) of the control. To make the control transparent specify "transparent" as the background color value. You can also specify /BRANDING with or without text color and background color to make the control completely gray (or any other color you choose). This is used by the branding text control in the MUI. \c FindWindow $0 "#32770" "" $HWNDPARENT \c GetDlgItem $0 $0 1006