Reference/GetLabelAddress: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(Created page with "=GetLabelAddress= user_var(output) label Gets the address of the label and stores it in the output user variable. This user variable then can be passed to [[Reference/Call|Cal...")
 
mNo edit summary
 
Line 11: Line 11:
Goto $0
Goto $0
DetailPrint "done"</highlight-nsis>
DetailPrint "done"</highlight-nsis>
''Command introduced with NSIS v1.80''

Latest revision as of 20:46, 4 June 2013

GetLabelAddress

user_var(output) label

Gets the address of the label and stores it in the output user variable. This user variable then can be passed to Call or Goto. Note that you may only call this with labels accessible from your function, but you can call it from anywhere (which is potentially dangerous). Note that if you Call the output of GetLabelAddress, code will be executed until it Return's (explicitly or implicitly at the end of a function), and then you will be returned to the statement after the Call.

label:
DetailPrint "label"
GetLabelAddress $0 label
IntOp $0 $0 + 4
Goto $0
DetailPrint "done"

Command introduced with NSIS v1.80