PPT 计时器项目教程
ppttimer 一个简易的 PPT 计时器 项目地址: https://gitcode.com/gh_mirrors/pp/ppttimer
1. 项目的目录结构及介绍
PPT 计时器项目的目录结构如下:
ppttimer/
├── gitignore
├── LICENSE.txt
├── README.md
├── applause.mp3
├── beep.mp3
├── ppttimer.ahk
├── ppttimer.ico
├── ppttimer.ini
├── ppttimer.png
└── screenshot.png
目录结构介绍
- gitignore: Git 忽略文件配置。
- LICENSE.txt: 项目许可证文件,采用 MIT 许可证。
- README.md: 项目说明文件,包含项目的基本介绍和使用方法。
- applause.mp3: 计时结束时的提示音文件。
- beep.mp3: 提前提醒时的提示音文件。
- ppttimer.ahk: 项目的主脚本文件,基于 AutoHotkey 编写。
- ppttimer.ico: 项目的图标文件。
- ppttimer.ini: 项目的配置文件,包含计时器的时间设置、声音设置、窗口样式等。
- ppttimer.png: 项目的图标文件(PNG 格式)。
- screenshot.png: 项目的屏幕截图文件。
2. 项目的启动文件介绍
项目的启动文件是 ppttimer.ahk
,这是一个基于 AutoHotkey 编写的脚本文件。该文件实现了 PPT 计时器的核心功能,包括:
- 自动开始倒计时: 当 PowerPoint 开始播放时,计时器会自动启动。
- 自动停止计时: 当 PowerPoint 结束放映时,计时器会自动停止。
- 悬浮窗口: 计时器窗口悬浮于最上层,鼠标可穿透,不影响其他操作。
- 手动控制: 可以通过快捷键手动启动和停止计时器。
启动方法
- 下载并解压项目文件。
- 运行
ppttimer.ahk
文件即可启动计时器。
3. 项目的配置文件介绍
项目的配置文件是 ppttimer.ini
,该文件包含了计时器的各项配置参数,具体内容如下:
[Main]
; 倒计时时间,单位秒,默认为 1200 秒即 20 分钟
Duration=1200
; 提前提醒时间,单位秒,默认为 120 秒即 2 分钟
Ahead=120
; 提前提醒时是否播放声音及声音路径
PlayWarningSound=1
WarningSoundFile=\beep.mp3
; 时间到时是否播放声音及声音路径
PlayFinishSound=1
FinishSoundFile=\applause.mp3
; 窗口样式
; 透明度
opacity=180
; 窗口背景色
backgroundColor=FFFFAA
; 窗口大小,位置固定在右上角
width=300
height=70
; 字体样式
fontface=微软雅黑
fontweight=bold
fontsize=40
textcolor=000000
; 提前提醒时的字体颜色
AheadColor=9D1000
; 超时后的字体颜色
timeoutColor=FF0000
[shortcuts]
; 快捷键设置
; ^ Ctrl, # Windows, + Shift, ! Alt
; 开始手动计时
startKey=F12
; 停止计时器
stopKey=^F12
; 退出主程序
quitKey=#ESC
配置文件说明
- [Main] 部分: 包含计时器的主要配置参数,如倒计时时间、提前提醒时间、声音设置、窗口样式等。
- [shortcuts] 部分: 包含快捷键设置,用于手动控制计时器的启动、停止和退出。
通过修改 ppttimer.ini
文件,用户可以根据自己的需求自定义计时器的各项参数。
ppttimer 一个简易的 PPT 计时器 项目地址: https://gitcode.com/gh_mirrors/pp/ppttimer
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考