NSIS 宏的用法
时间:2009-04-25 | 作者:本站整理 | 阅读:1144SetCompressor /SOLID lzma
SetCompress force
XPStyle on
OutFile "aaa.EXE"
Name "aaa"
!macro add a b c ;一个实现(a+b)*(a-b)的宏
IntOp $R0 ${a} - ${b}
IntOp $R1 ${a} + ${b}
IntOp ${c} $R0 * $R1
!macroend
/*
注意:!macro和!insertmacro用法:
!macro add a b c ;!macro 宏名 参数一 参数二 参数三 ...
!insertmacro add 10 20 $0 ;!insertmacro 宏名 参数一 参数二 参数三 ...
使用的时候!insertmacro的参数会代入!macro里面使用
就是如!insertmacro add 10 20 $0
代入!macro add a b c
.那么在!macro add里面等效于执行了
IntOp $R0 10 - 20
IntOp $R1 10 + 20
IntOp $0 $R0 * $R1
*/
Section
!insertmacro add 10 20 $0 ;调用宏
DetailPrint '$0'
!insertmacro add 5 10 $0
DetailPrint '$0'
!insertmacro add 2 10 $0
DetailPrint '$0'
!insertmacro add 2 587 $0
DetailPrint '$0'
!insertmacro add 15 58 $0
DetailPrint '$0'
!insertmacro add 158 58 $0
DetailPrint '$0'
!insertmacro add 0 4 $0
DetailPrint '$0'
!insertmacro add 87 587 $0
DetailPrint '$0'
!insertmacro add 587 5 $0
DetailPrint '$0'
!insertmacro add 8 58 $0
DetailPrint '$0'
SectionEnd
福利游戏
相关文章
更多大家都在玩
大家都在看
更多-
- 明日方舟官方回应内容被泄露:严肃追究相关责任!
- 时间:2025-07-27
-
- 特斯拉是赢了 但不是真相的全部
- 时间:2025-07-27
-
- 历史性突破!国内单套规模最大乙醇脱水制乙烯装置投产
- 时间:2025-07-27
-
- IE浏览器升级攻略:安全防护新选择
- 时间:2025-07-27
-
- 艾达币是什么?艾达币是数字货币吗?艾达币来源及意思详解
- 时间:2025-07-27
-
- BitfinexAPP怎么查看行情
- 时间:2025-07-27
-
- 加密货币购买时机?Web3 AI或成黑马
- 时间:2025-07-27
-
- KOMA币投资指南:小众币的暴富机会?
- 时间:2025-07-27