Skip to content

Commit

Permalink
Hotfix (#8)
Browse files Browse the repository at this point in the history
* fixed the issue of that BOM would be in encrypt file
* 更新谱面
  • Loading branch information
Nigh authored Nov 6, 2021
1 parent c5a6bdf commit 030a827
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 18 deletions.
32 changes: 22 additions & 10 deletions DoMiSo.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ if debug
{
MsgBox, 0x41030,ATTENTION,You are running DEBUG version of the program!!!
}
; Is it limited to in genshin use
genshinLimit := 1

OnExit, TrueExit
#Include log.ahk
Expand Down Expand Up @@ -141,7 +143,11 @@ analyseNotes(Notes)
}

genshin_main:
genshin_win_hwnd:=genshin_window_exist()
if(genshinLimit) {
genshin_win_hwnd:=genshin_window_exist()
} else {
genshin_win_hwnd:=1
}
if((genshin_play_p > genshin_play_array.Length()) or (!genshin_win_hwnd))
{
isBtn1Playing:=0
Expand All @@ -157,8 +163,12 @@ While(nowTime//(freq/1000)-startTime >= genshin_play_array[genshin_play_p].delay
{
Return
}
if WinActive("ahk_id " genshin_win_hwnd)
{
if(genshinLimit) {
if WinActive("ahk_id " genshin_win_hwnd)
{
Send, % genshin_play_array[genshin_play_p].note
}
} else {
Send, % genshin_play_array[genshin_play_p].note
}
; ControlSend, ,% genshin_play_array[genshin_play_p].note, ahk_exe GenshinImpact.exe
Expand Down Expand Up @@ -207,15 +217,17 @@ GuiDropFiles(GuiHwnd, FileArray, CtrlHwnd, X, Y) {

genshin_play()
{
global startTime, freq, genshin_play_p, isBtn1Playing
global startTime, freq, genshin_play_p, isBtn1Playing, genshinLimit
genshin_play_p := 1
DllCall("QueryPerformanceCounter", "Int64P", nowTime)
genshin_hwnd := genshin_window_active(genshin_window_exist())
WinWaitActive, ahk_id %genshin_hwnd%,, 0
if(ErrorLevel==1)
{
MsgBox, 0x41010,,Genshin is not running!!!
Return
if(genshinLimit) {
genshin_hwnd := genshin_window_active(genshin_window_exist())
WinWaitActive, ahk_id %genshin_hwnd%,, 0
if(ErrorLevel==1)
{
MsgBox, 0x41010,,Genshin is not running!!!
Return
}
}
isBtn1Playing:=1
btn1update()
Expand Down
4 changes: 2 additions & 2 deletions Encrypt.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Decrypt_file(f)
ciphertext:=""
plaintext_len:=0
ciphertext_len:=0
f.Seek(8)
f.Seek(8, 1)
Loop, 4
{
cipher_key[A_Index]:=f.ReadUChar()
Expand Down Expand Up @@ -179,7 +179,7 @@ Encrypt_dms_enc(v)
NumPut(NumGet(ciphertext, A_Index-1, "UChar"), output, head_len+plain_len+A_Index-1, "UChar")
}
filename:="DoMiSoCipher_" A_Now ".dms"
File := FileOpen(filename, "w")
File := FileOpen(filename, "w", "UTF-8-RAW")
File.RawWrite(output, output_len)
File.Close()
Return filename
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![](logo.png)

- github:https://github.com/Nigh/DoMiSo
- github:https://github.com/Nigh/DoMiSo-genshin

> This document has been mostly translated by `deepl.com`
Expand Down
Binary file modified assets/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
4 changes: 2 additions & 2 deletions meta.ahk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@


FileEncoding, UTF-8
name_en:="Domiso Automata"
name_zh:="原神自动弹琴人偶"
version:="0.99.0"
version:="0.99.1"
versionFilename:="version.txt"
ahkFilename:="DoMiSo.ahk"
binaryFilename:="Domiso-Genshin.exe"
Expand Down
4 changes: 1 addition & 3 deletions update.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ outputVersion(){
{
RegExMatch(param, "--out=(\w+)", outName)
if(outName1=="version") {
f := FileOpen("version.txt","w")
f := FileOpen("version.txt","w","UTF-8-RAW")
f.Write(version)
f.Close()
ExitApp
Expand Down Expand Up @@ -47,8 +47,6 @@ if(autoUpdate) {
}
}

updateSite:=""

get_latest_version(){
global
req := ComObjCreate("MSXML2.ServerXMLHTTP")
Expand Down

0 comments on commit 030a827

Please sign in to comment.