[AHK-] GUI Text 重新排列
請問大家
假如原本在GUI中有七項text分別為
aaa
bbb
ccc
ddd
eee
fff
ggg
在window spy看它們的ClassNN分別為
Static1
Static2
Static3
Static4
Static5
Static6
Static7
我想把們重新排列為
fff
ccc
bbb
ddd
aaa
eee
因此使用了GuiControl,Move 來去做他們的排列
也很成功的排列
但卻有時候(10%出現機率)會出現錯誤的狀況,但使用window spy看內容卻是正常
像是會變成
aaa (ClassNN:Static6 Text:fff)
bbb (ClassNN:Static3 Text:ccc)
bbb (ClassNN:Static2 Text:bbb)
ddd (ClassNN:Static4 Text:ddd)
aaa (ClassNN:Static1 Text:aaa)
eee (ClassNN:Static5 Text:eee)
當系統繁忙有點lag時就會出現
(下面的例子中在GuiControl,Move每行加個sleep時間表系統繁忙處理狀態,就會更容易出
現)
這該怎麼解決呢?
謝謝
-------------------------------------------------------------------------------
Gui, Add, Text, x21 y14 w150 h30 , aaa
Gui, Add, Text, x21 y54 w150 h30 , bbb
Gui, Add, Text, x21 y94 w150 h30 , ccc
Gui, Add, Text, x21 y134 w150 h30 , ddd
Gui, Add, Text, x21 y174 w150 h30 , eee
Gui, Add, Text, x21 y214 w150 h30 , fff
Gui, Add, Button, x11 y254 w150 h30 , Change
Gui, Show, xcenter ycenter autosize, demo
Return
GuiClose:
ExitApp
ButtonChange:
Guicontrol,move,Static1,x21 y174 w200 h30
Guicontrol,move,Static2,x21 y94 w200 h30
Guicontrol,move,Static3,x21 y54 w200 h30
Guicontrol,move,Static4,x21 y134 w200 h30
Guicontrol,move,Static5,x21 y214 w200 h30
Guicontrol,move,Static6,x21 y14 w200 h30
return
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.43.21.207
推
08/17 18:57, , 1F
08/17 18:57, 1F
→
08/18 00:22, , 2F
08/18 00:22, 2F
→
08/18 00:30, , 3F
08/18 00:30, 3F
→
08/18 00:32, , 4F
08/18 00:32, 4F
EzHotKey 近期熱門文章
PTT數位生活區 即時熱門文章