Skip to content

Commit

Permalink
v3.2.1 fix chinese comment bug
Browse files Browse the repository at this point in the history
  • Loading branch information
taojiayuan committed Jan 19, 2021
1 parent d9a7ca3 commit 2b4bc1d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
23 changes: 21 additions & 2 deletions Frame1.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import ctypes


VERSION = '3.2'
VERSION = '3.2.1'


wx.NO_3D = 0
Expand Down Expand Up @@ -475,7 +475,26 @@ def run(self):
def run_script_once(cls, script_path, thd=None):

content = ''
for line in open(script_path, 'r').readlines():

lines = []
try:
lines = open(script_path, 'r').readlines()
except Exception as e:
print(e)

if not lines:
try:
lines = open(script_path, 'r', encoding='utf8').readlines()
except Exception as e:
print(e)

if not lines:
try:
lines = open(script_path, 'r', encoding='gbk').readlines()
except Exception as e:
print(e)

for line in lines:
# 去注释
if '//' in line:
index = line.find('//')
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# KeymouseGo v3.2
# KeymouseGo v3.2.1

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

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


## v3.2.1

+ 修复了中文注释无法解析的 bug


## v3.2

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

0 comments on commit 2b4bc1d

Please sign in to comment.