二话不说,直接上代码。
考虑到楼主的电脑无法安装任何其他软件,那么只能用一般都有的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
厉害
二话不说,直接上代码。
考虑到楼主的电脑无法安装任何其他软件,那么只能用一般都有的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
这个必须手动赞一个
二话不说,直接上代码。
考虑到楼主的电脑无法安装任何其他软件,那么只能用一般都有的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
mark
谢谢分享
话说没有监控的公司怎么知道会不会在默默监控呢?
二话不说,直接上代码。
考虑到楼主的电脑无法安装任何其他软件,那么只能用一般都有的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
lol 虽然我公司没这么变态 但是收藏备用
ebay 有卖的,防sleep鼠标。在ebay里面搜:mouse jiggler
这些会移动的,但是不知道会不会click(比如clock右键?),可能得再找找?
有用的帖子需要留名一下
话说没有监控的公司怎么知道会不会在默默监控呢?
明朗少女 发表于 2022-05-18 09:39
co-ask
到底了
Hot Deals
All Deals