Reference/GetCurrentAddress: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(Created page with "=GetCurrentAddress= user_var(output) Gets the address of the current instruction (the GetCurrentAddress) and stores it in the output user variable. This user variable then can...")
 
mNo edit summary
 
Line 25: Line 25:
   DetailPrint "section end"
   DetailPrint "section end"
SectionEnd</highlight-nsis>
SectionEnd</highlight-nsis>
''Command introduced with NSIS v1.80''

Latest revision as of 20:47, 4 June 2013

GetCurrentAddress

user_var(output)

Gets the address of the current instruction (the GetCurrentAddress) and stores it in the output user variable. This user variable then can be passed to Call or Goto.

Function func
  DetailPrint "function"
  IntOp $0 $0 + 2
  Call $0
  DetailPrint "function end"
FunctionEnd
 
Section
  DetailPrint "section"
  DetailPrint "section"
  GetCurrentAddress $0
  Goto callFunc
 
  DetailPrint "back to section"
  Return
 
callFunc:
  Call func
  DetailPrint "section end"
SectionEnd

Command introduced with NSIS v1.80