#include <GUIConstantsEx.au3>
#include <ListBoxConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#include <ListViewConstants.au3>
TraySetState(2) ;隐藏托盘图标
$Form1 = GUICreate("屏保屏蔽窗口", 3000, 3000)
$zfc = "慈禧垂帘听政|"
$ListView1 = GUICtrlCreateListView($zfc & $zfc & $zfc & $zfc & $zfc & $zfc & $zfc & $zfc & $zfc & $zfc & $zfc & $zfc & $zfc & $zfc & $zfc & $zfc & $zfc & $zfc & $zfc & $zfc & $zfc, -1, -1, 6000, 6000)
GUICtrlSendMsg($ListView1, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES) ;不能改 好像
GUICtrlSetBkColor($ListView1, 0x81A9E8)
$mima = "666666"
WinSetOnTop("屏保屏蔽窗口", "", 1) ;置顶,致使即使关闭记事本,也不会看到其他窗口
WinSetTrans("屏保屏蔽窗口", "", 255)
GUISetState(@SW_SHOW) ;这句经常用,让窗口通过循环的方式显示出来
While 1
WinSetState("请输入屏保屏蔽窗口", "", @SW_DISABLE) ;禁止移动屏保窗口的作用
$sFile = "c:\请输入密码666666.txt"
FileOpen($sFile, 1)
FileClose($sFile)
If WinExists("请输入密码666666.txt - 记事本") = 0 Then
Run("notepad.exe c:\请输入密码666666.txt ")
EndIf
while 1
If WinExists("请输入密码666666.txt - 记事本") >1 Then
WinKill("请输入密码666666.txt - 记事本")
EndIf
If WinExists("请输入密码666666.txt - 记事本") =1 Then
exitloop
EndIf
Sleep(10)
wend
$shuru = ControlGetText("请输入密码666666.txt - 记事本", "", "[CLASS:Edit; INSTANCE:1]")
If StringInStr($shuru, $mima) = 0 Then
WinMove("请输入密码666666.txt - 记事本", "", 0, 0, 300, 100)
WinSetOnTop("请输入密码666666.txt - 记事本", "", 1) ;始终置顶,便于输入密码
WinActivate("请输入密码666666.txt - 记事本")
EndIf
If StringInStr($shuru, $mima) > 0 Then
ProcessClose("notepad.exe")
WinKill("屏保屏蔽窗口")
WinKill("请输入密码666666.txt - 记事本")
FileDelete($sFile)
ExitLoop
EndIf
Sleep(10) ;养成良好的习惯,一定要加上缓冲时间
WEnd |