Skip to content

Commit b449935

Browse files
committed
修改取消隐藏逻辑
修改取消隐藏逻辑,取消隐藏后显示在左上角
1 parent 32f548a commit b449935

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

winautohidev2.ahk

+14-7
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,19 @@ Reset(*){
4646
global rightTopEdge
4747
global leftDPI
4848
global rightDPI
49-
for i,v in hiddenWindowList{
50-
WinMove(showMargin+leftEdge,showMargin+leftTopEdge,,,"ahk_id" v.id)
49+
50+
hiddenLength := hiddenWindowList.Length
51+
Loop hiddenLength {
52+
window := hiddenWindowList.Get(hiddenWindowList.Length)
53+
hiddenWindowList.RemoveAt(hiddenWindowList.Length)
54+
WinMove(showMargin+leftEdge,showMargin+leftTopEdge,,,"ahk_id" window.id)
55+
WinSetAlwaysOnTop(0,"ahk_id" window.id)
56+
}
57+
suspendLength := suspendWindowList.Length
58+
Loop suspendLength {
59+
suspendWindowList.RemoveAt(suspendWindowList.Length)
5160
}
61+
5262
}
5363

5464

@@ -171,10 +181,7 @@ WatchCursor(){
171181
}
172182

173183
^F4::{
174-
hiddenCount := hiddenWindowList.Length
175-
Loop hiddenCount {
176-
hiddenWindowList.RemoveAt(hiddenWindowList.Length)
177-
}
184+
Reset()
178185
}
179186

180187

@@ -213,7 +220,7 @@ showWindow(window){
213220
NewX := showMargin+leftEdge
214221
}
215222
else if mode="right"{
216-
NewX := rightEdge-Round(showMargin*rightDPI)-Round(W*rightDPI)
223+
NewX := rightEdge-Round(showMargin*rightDPI)-Round(W*rightDPI)+5
217224
}
218225
; WinMove(NewX, Y,,,window)
219226
winSmoothMove(newX,Y,windowText)

0 commit comments

Comments
 (0)