最新消息:

两只老虎音乐伴奏

nsis 永恒心锁 1886浏览 0评论
!include "LogicLib.nsh"
SetCompressor lzma
XPStyle on
OutFile "Two_Tiger.exe"
Name "两只老虎"
Var RetVar
!define Return `!insertmacro Return`
!macro Return Ret
StrCpy $RetVar "${Ret}"
Goto ReturnPre
!macroend
!define frequency `!insertmacro frequency`
!macro frequency scale melody
Push ${melody}
Push ${scale}
Call frequency
!macroend
Function frequency
Exch $0
Exch
Exch $1
StrCpy $RetVar ""
${IfThen} $0 == "0" ${|} ${Return} 0 ${|}
${If} $1 == "C"
${Switch} $0
${Case} "1"
 ${Return} 264
${Case} "2"
${Return} 297
${Case} "3"
 ${Return} 330
${Case} "4"
 ${Return} 352
${Case} "5"
 ${Return} 396
${Case} "6"
 ${Return} 440
${Case} "7"
 ${Return} 495
${EndSwitch}
${ElseIf} $1 == "D"
${Switch} $0
${Case} "1"
 ${Return} 297
${Case} "2"
 ${Return} 334
${Case} "3"
 ${Return} 371
${Case} "4"
 ${Return} 396
${Case} "5"
 ${Return} 446
${Case} "6"
 ${Return} 495
${Case} "7"
 ${Return} 557
${EndSwitch}
${EndIf}
SetErrors
ReturnPre:
Pop $1
Pop $0
FunctionEnd
!define book `!insertmacro book`
!macro book book speed melody
System::Call `*(t"${book}", i${speed}, t"${melody}")i.s`
Call book
!macroend
Function book
Exch $0
Push $1
Push $2
Push $3
Push $4
Push $5
Push $6
Push $7
System::Call "*$0(t.r1, i.r2, t.r3)"
System::Free $0
StrLen $4 $1
${For} $0 1 $4
 StrCpy $5 $1 1 $0
 ${frequency} $5 $3
 ${IfThen} ${Errors} ${|} ${Continue} ${|}
 StrCpy $6 $2
 IntOp $7 $0 + 1
 StrCpy $7 $1 1 $7
${Switch} $7
${Case} "H"
${frequency} $5 $3
IntOp $RetVar $RetVar * 2
${Break}
${Case} "L"
${frequency} $5 $3
IntOp $RetVar $RetVar / 2
${Break}
${Case} "Q"
 IntOp $6 $2 / 2
 ${Break}
${Case} "S"
IntOp $6 $2 * 2
 ${EndSwitch}
 ${If} $RetVar = 0
 Sleep $2
 ${Else}
 System::Call Kernel32::Beep(i$RetVar,ir6)
 ${EndIf}
${Next}
Pop $7
Pop $6
Pop $5
Pop $4
Pop $3
Pop $2
Pop $1
Pop $0
FunctionEnd
Section
${book} "12311231345034505Q6Q5Q4Q315Q6Q5Q4Q3126L1026L1" 300 "D"
SectionEnd
免责声明:根据《计算机软件保护条例》第十七条规定“为了学习和研究软件内含的设计思想和原理,通过安装、显示、传输或者存储软件等方式使用软件的,可以不经软件著作权人许可,不向其支付报酬。”您需知晓本站所有内容资源均来源于网络,仅供用户交流学习与研究使用,版权归属原版权方所有,版权争议与本站无关,用户本人下载后不能用作商业或非法用途,需在24个小时之内从您的电脑中彻底删除上述内容,否则后果均由用户承担责任;如果您访问和下载此文件,表示您同意只将此文件用于参考、学习而非其他用途,否则一切后果请您自行承担,如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。丨本站为个人博客非盈利性站点,所有软件信息均来自网络,所有资源仅供学习参考研究目的,并不贩卖软件,不存在任何商业目的及用途。丨本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » 两只老虎音乐伴奏

您必须 登录 才能发表评论!