Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
add SleepTime.cfg to config delay time
Browse files Browse the repository at this point in the history
  • Loading branch information
SummonHIM committed Dec 9, 2022
1 parent ef16c94 commit dcd39ae
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 17 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,30 @@ jobs:
$CompressRelease = @{
LiteralPath= "AutoWeMeeting64.exe", "AutoWeMeeting32.exe", "AutoWeMeeting.ahk", "Schedule.csv", "AWM-JoinMeet.png", "README.md", "LICENSE"
CompressionLevel = "Optimal"
DestinationPath = "AutoWeMeeting.zip"
DestinationPath = "AutoWeMeeting-Build-$env:GITHUB_RUN_NUMBER.zip"
}
Compress-Archive @CompressRelease
- name: Generate release body
shell: pwsh
run: |
Write-Output "## 下载此版本" | Out-File -FilePath ReleaseBody.txt -Encoding utf8
Write-Output "[![下载@Build-$env:GITHUB_RUN_NUMBER](https://img.shields.io/github/downloads/SummonHIM/AutoWeMeeting/Build-$env:GITHUB_RUN_NUMBER/total?label=%E4%B8%8B%E8%BD%BD%40Build-$env:GITHUB_RUN_NUMBER&style=for-the-badge)](https://github.com/SummonHIM/AutoWeMeeting/releases/download/Build-$env:GITHUB_RUN_NUMBER/AutoWeMeeting-Build-$env:GITHUB_RUN_NUMBER.zip)" | Out-File -FilePath ReleaseBody.txt -Encoding utf8 -Append
Write-Output "## 更新日志" | Out-File -FilePath ReleaseBody.txt -Encoding utf8 -Append
Write-Output "https://github.com/SummonHIM/AutoWeMeeting/compare/Build-$($env:GITHUB_RUN_NUMBER-1)...Build-$env:GITHUB_RUN_NUMBER" | Out-File -FilePath ReleaseBody.txt -Encoding utf8 -Append
- name: Upload artifact to workflows
uses: actions/upload-artifact@v3
with:
name: Build
path: AutoWeMeeting.zip

path: AutoWeMeeting-Build-${{ github.run_number }}.zip

- name: Create and upload artifact to Releases
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: AutoWeMeeting Build ID${{ github.run_number }}
tag_name: Build-${{ github.run_number }}
token: ${{ secrets.GITHUB_TOKEN }}
body_path: ReleaseBody.txt
prerelease: true
files: AutoWeMeeting.zip
files: AutoWeMeeting-Build-${{ github.run_number }}.zip
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.exe
*.exe
Configs/
19 changes: 12 additions & 7 deletions AutoWeMeeting.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
WeMeetFolder := ""
Else {
try
WeMeetFolder := RegRead()
WeMeetFolder := RegRead()
}
Return WeMeetFolder
}
Expand Down Expand Up @@ -52,24 +52,29 @@ LoadCSVSchedule(ReqParams) {
If (CheckWeMeetLocation()) {
TrayTip "请注意前台尽量不要打开窗口!", "程序已在后台运行!", 1
} Else {
TrayTip ,"没有检测到腾讯会议!退出。", 2
TrayTip , "没有检测到腾讯会议!退出。", 2
Exit
}

; 手动调整执行 Delay。如果你的电脑越卡建议设越长的时间。单位毫秒。
SleepTime := 1000
; 读取 Configs\SleepTime.cfg 来调整 Delay。如果你的电脑越卡建议设越长的时间。单位毫秒。
if FileExist("Configs\SleepTime.cfg") {
SleepTime := FileRead("Configs\SleepTime.cfg")
TrayTip "设定的执行延迟为:" SleepTime "毫秒", "已读取设定好的自定义执行延迟!", 1
} Else {
SleepTime := 1000
}

While True {
For Index, CheckTime in LoadCSVSchedule("sDateTime") {
If (Number(FormatTime(CheckTime, "yyyyMMddhhmmss")) = Number(FormatTime(,"yyyyMMddhhmmss"))) {
If (Number(FormatTime(CheckTime, "yyyyMMddhhmmss")) = Number(FormatTime(, "yyyyMMddhhmmss"))) {
TrayTip "正在启动会议 ID " LoadCSVSchedule("MeetID")[Index] ",请不要移动鼠标或键盘…", FormatTime(CheckTime " R") " 到钟!", 1
If (ProcessExist("wemeetapp.exe")) {
ProcessClose "wemeetapp.exe"
Sleep SleepTime
}
WinMinimizeAll
Run GetWeMeetLocation() "\wemeetapp.exe"
While ! WinExist("ahk_exe wemeetapp.exe") {
While !WinExist("ahk_exe wemeetapp.exe") {
Sleep SleepTime * 10
}
WinMoveTop "ahk_exe wemeetapp.exe"
Expand Down Expand Up @@ -97,4 +102,4 @@ While True {
Sleep SleepTime * 10
}
}
}
}
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@

## 使用说明
1. 解压下载好的压缩包。
2. 按照实际情况使用表格软件编写课程表[编写教程](#课程表编写指南)
2. 按照实际情况使用表格软件编写时间表([Schedule.csv](https://github.com/SummonHIM/AutoWeMeeting/blob/master/Schedule.csv)[编写教程](#时间表编写指南)
3. 打开软件,32 位与 64 位根据实际情况选一个打开。软件将在后台运行。到点自动开启会议。

## 注意事项
- 当脚本运行中,即使编辑课程表,保存也能马上应用。可以不用重启。
- 当脚本运行中,即使编辑时间表,保存也能马上应用。可以不用重启。
- 若你的电脑启动腾讯会议较为卡顿。可在程序目录创建 Configs\SleepTime.cfg 文件(其中`Configs`为文件夹名)。并在文件内直接输入执行延迟数值。单位毫秒。

**若时间已到运行时请:**
- **不要**移动鼠标或点击键盘。
- 虽然脚本会最小化所有窗口。但还是**尽量不要**打开窗口。
- **可以**关闭电脑屏幕,但**不能**进入锁屏状态。
- 若使用 RDP(远程桌面连接),则**不能**最小化窗口。

## 课程表编写指南
- A 列 (sDateTime):填具体运行时间,格式如下:[点击查看](https://wyagd001.github.io/v2/docs/commands/FileSetTime.htm#YYYYMMDD)
## 时间表编写指南
- A 列 (sDateTime):填具体运行时间,格式如下:[点击查看](https://wyagd001.github.io/v2/docs/commands/FileSetTime.htm#YYYYMMDD),示例:202212081355 即为 2022年12月8日13点55分
- B 列 (MeetID):填腾讯会议号
- C 列 (PassWD):填会议密码(可选)

Expand Down
3 changes: 3 additions & 0 deletions Schedule.csv
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
sDateTime,MeetID,PassWD
202212081355,98495572756,
202212090825,96627696673,
202212091355,875286375,

0 comments on commit dcd39ae

Please sign in to comment.