我也有这个情况。去撒泡尿的时间就给我lock screen断vpn.
我有个arduino做的假鼠标,插上模拟鼠标在动。不过那个软件比较智能,能识别这个。
尽量假装忙。对付这种公司只能这么干
二话不说,直接上代码。
考虑到楼主的电脑无法安装任何其他软件,那么只能用一般都有的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,run的时候告诉我
Compile error:
Object required
用autoit做个script。在分屏模式下,不停开关一个文件就可以了。
https://www.portablefreeware.com/?id=50
AutoIt Portable is a portable wrapper for AutoIt and SciTE4AutoIt3. It ensures SciTE doesn't leave any traces on the users machine. To install you can either use the AutoIt Creator or manually create the AutoIt package by following the instructions below.
我读PDF时候做了实验,手工移动鼠标都不行,必须有点击的动作(click)。
Grace302 发表于 2022-05-16 22:18
楼主的意思怎样算在工作和当前正在使用的应用软件有关
那如果没打开任何应用软件,就在desktop上移动鼠标有效吗?
会不会fully remote以后公司都开始这么变态了?
把下面代码存成idle.vbs,然后运行。 粗体字5代表每5分钟动作,自行修改成所需时间间隔即可。
set wsc = CreateObject("WScript.Shell")
Do
'Five Minutes
WScript.Sleep(5*60*1000)
wsc.SendKeys("{F13}")
Loop
boom 发表于 2022-05-17 00:46
借帖子问一下,我前一家公司发电脑我还可以run 这个code。
现在新公司是用virtual machine里面的电脑上线,我发现我连创建idle.vbs都弄不了。是不是楼上另外一位姐妹的excel vba code来保持team在线了?
二话不说,直接上代码。
考虑到楼主的电脑无法安装任何其他软件,那么只能用一般都有的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