改进脚本启动路径、错误提示和提示音文件名匹配#2
Open
reiqr wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
这个 PR 对脚本做了一些通用性改进,尽量保持原有使用方式不变。
变更内容
$PSScriptRoot读取EventLabels.json,避免从其他工作目录启动脚本时找不到配置文件。try / catch / finally,运行失败时显示明确错误原因,并在退出前等待用户按 Enter,避免 PowerShell 窗口一闪而过。通知(自定义台词).wav可以匹配到通知。NFP完成.wav可以匹配到NFP 完成。.Current,使当前声音设置可以直接使用这些提示音。测试方式
.wav文件名进行本地测试,确认可以正常匹配到EventLabels.json中的系统事件。兼容性说明