TGMajia
被公司电脑上变态的监控软件(sapience buddy)气疯了,求支招
40473
103
2022-05-17 11:20:02
二话不说,直接上代码。
考虑到楼主的电脑无法安装任何其他软件,那么只能用一般都有的Excel,
1.在EXCEL里,enable 开发者模式,然后加入一个按钮,然后这个按钮的代码如下:
Private Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal Y As Long) As Long
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Const MOUSEEVENTF_LEFTDOWN = &H2
Private Const MOUSEEVENTF_LEFTUP = &H4
Private working As Boolean
Sub keep_screen_live_Click()
Set working = True
Do While working
Call ClickMyScreen
MsgBox "clicking"
Sleep 60000
Loop
End Sub
Private Sub ClickMyScreen()
mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
Sleep 50
mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
Sleep 100
End Sub
然后保存成 macro的excel,点击开始按钮,就会自动60秒点一次屏幕了。
Helen_Wood 发表于 2022-05-17 00:29
牛啊,哪天试试玩。
到底了
Hot Deals
All Deals