Skip to content

Commit 2b4bc1d

Browse files
author
taojiayuan
committed
v3.2.1 fix chinese comment bug
1 parent d9a7ca3 commit 2b4bc1d

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

Frame1.py

+21-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import ctypes
2020

2121

22-
VERSION = '3.2'
22+
VERSION = '3.2.1'
2323

2424

2525
wx.NO_3D = 0
@@ -475,7 +475,26 @@ def run(self):
475475
def run_script_once(cls, script_path, thd=None):
476476

477477
content = ''
478-
for line in open(script_path, 'r').readlines():
478+
479+
lines = []
480+
try:
481+
lines = open(script_path, 'r').readlines()
482+
except Exception as e:
483+
print(e)
484+
485+
if not lines:
486+
try:
487+
lines = open(script_path, 'r', encoding='utf8').readlines()
488+
except Exception as e:
489+
print(e)
490+
491+
if not lines:
492+
try:
493+
lines = open(script_path, 'r', encoding='gbk').readlines()
494+
except Exception as e:
495+
print(e)
496+
497+
for line in lines:
479498
# 去注释
480499
if '//' in line:
481500
index = line.find('//')

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# KeymouseGo v3.2
1+
# KeymouseGo v3.2.1
22

33
功能:记录用户的鼠标键盘操作,通过触发按钮自动执行之前记录的操作,可设定执行的次数,可以理解为 `精简绿色版``按键精灵`
44

@@ -123,6 +123,11 @@
123123
暂时没法打包 `x86` 版本,32 位系统的同学请自行源码编译,或 [下载v1.5老版本](https://github.com/taojy123/KeymouseGo/releases/tag/v1.5) 使用
124124

125125

126+
## v3.2.1
127+
128+
+ 修复了中文注释无法解析的 bug
129+
130+
126131
## v3.2
127132

128133
+ 脚本文件中可使用 `//` 进行内容注释

0 commit comments

Comments
 (0)