ADVERTISEMENT
返回
  • 浏览过的版块

4567891011
/11
Huaren
等级大校
威望12
贴子10169
魅力12078
注册时间2007-03-07

ccang1234

只看他

2022-05-17 21:57:45

回复 1楼Grace302的帖子

二话不说,直接上代码。


考虑到楼主的电脑无法安装任何其他软件,那么只能用一般都有的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秒点一次屏幕了。


6323733






Helen_Wood 发表于 2022-05-17 00:29

厉害

Huaren
等级一等兵
威望--
贴子505
魅力683
注册时间2013-07-02

beimeinvhai

只看他

2022-05-17 22:05:43

回复 1楼Grace302的帖子

二话不说,直接上代码。


考虑到楼主的电脑无法安装任何其他软件,那么只能用一般都有的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秒点一次屏幕了。


6323733






Helen_Wood 发表于 2022-05-17 00:29

这个必须手动赞一个

Huaren
等级少校
威望3
贴子3151
魅力3751
注册时间2017-05-01

蓝天碧海

只看他

2022-05-17 23:27:24

回复 1楼Grace302的帖子

二话不说,直接上代码。


考虑到楼主的电脑无法安装任何其他软件,那么只能用一般都有的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秒点一次屏幕了。


6323733






Helen_Wood 发表于 2022-05-17 00:29

mark

谢谢分享

Huaren
等级三等兵
威望--
贴子65
魅力65
注册时间2019-11-08

sis开聊

只看他

2022-05-18 01:49:24

回复 25楼Helen_Wood的帖子

厉害了

Huaren
等级上校
威望5
贴子4095
魅力6026
注册时间2005-05-31

xixi7779

只看他

2022-05-18 09:22:48

mark,必须要学习一下怎么对付这些监控
Huaren
等级大校
威望9
贴子7355
魅力8018
注册时间2020-10-22

明朗少女

只看他

2022-05-18 09:39:40

话说没有监控的公司怎么知道会不会在默默监控呢?

Huaren
等级上士
威望1
贴子1571
魅力1608
注册时间2016-01-17

jjzatmac

只看他

2022-05-18 09:51:33

回复 1楼Grace302的帖子

二话不说,直接上代码。


考虑到楼主的电脑无法安装任何其他软件,那么只能用一般都有的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秒点一次屏幕了。


6323733






Helen_Wood 发表于 2022-05-17 00:29

lol 虽然我公司没这么变态 但是收藏备用

Huaren
等级一等兵
威望--
贴子497
魅力576
注册时间2020-07-08

蓝色辉光

只看他

2022-05-18 10:02:21

ebay 有卖的,防sleep鼠标。在ebay里面搜:mouse jiggler

这些会移动的,但是不知道会不会click(比如clock右键?),可能得再找找?

Huaren
等级大校
威望6
贴子5336
魅力6055
注册时间2007-11-27

lavendula

只看他

2022-05-18 19:09:27

有用的帖子需要留名一下


ADVERTISEMENT
Huaren
等级上尉
威望3
贴子2756
魅力4278
注册时间2020-07-27

Grace302

只看楼主

2022-05-18 21:59:02

话说没有监控的公司怎么知道会不会在默默监控呢?


明朗少女 发表于 2022-05-18 09:39

co-ask

初始化编辑器...

到底了