dergula 0 Posted January 13, 2020 Is there a script available that can kill a process, or kill multiple processes after the mouse has been idle for a specific amount of time? Thanks for any help. Share this post Link to post Share on other sites
Nine 921 Posted January 13, 2020 Yes there is multiple. Just google it, and gather a few scripts. If you still need help after, post the code you got, and we will look at it. Not much of a signature, but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Tool to search content in au3 files Date Range Picker Sudoku Game 2020 Overlapped Named Pipe IPC x64 Bitwise Operations Fast and simple WCD IPC GIF Animation (cached) Share this post Link to post Share on other sites
dergula 0 Posted January 13, 2020 Thanks for the response. I was googling, but only found some scripts for system idle. I was specifically looking foe mouse idle only. Share this post Link to post Share on other sites
Nine 921 Posted January 13, 2020 I see. Then my personal approach would be to hook the mouse with something like this: Global $g_hStub_MouseProc = DllCallbackRegister("_MouseProc", "long", "int;wparam;lparam") Global $hMod = _WinAPI_GetModuleHandle(0) Global $g_hHook2 = _WinAPI_SetWindowsHookEx($WH_MOUSE_LL, DllCallbackGetPtr($g_hStub_MouseProc), $hMod) Google those functions, you will get plenty of examples using them. Not much of a signature, but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Tool to search content in au3 files Date Range Picker Sudoku Game 2020 Overlapped Named Pipe IPC x64 Bitwise Operations Fast and simple WCD IPC GIF Animation (cached) Share this post Link to post Share on other sites
SkysLastChance 10 Posted January 13, 2020 (edited) <Read> Edited January 13, 2020 by SkysLastChance Life's simple. You make choices and you don't look back. Share this post Link to post Share on other sites
dergula 0 Posted January 13, 2020 No, I was hoping to build a script that can kill a process(s) when the mouse has been idle for an x amount of time. Share this post Link to post Share on other sites
Davidowicza 18 Posted January 13, 2020 Start off by looking at MouseGetPos(), TimerInit(), and ProcessClose() functions. Share this post Link to post Share on other sites
Somerset 3,040 Posted January 13, 2020 Be aware that some "scripts that kill processes" can be flagged as false positives on some antivirus. Spoiler Share this post Link to post Share on other sites
Nine 921 Posted January 13, 2020 1 hour ago, Davidowicza said: Start off by looking at MouseGetPos(), TimerInit(), and ProcessClose() functions. Yep, those are the basics for what OP wants to achieve. I would be careful though with MouseGetPos in that it is only valid as long as the mouse moves. What if the mouse is clicked without moving or mouse wheel is used without moving ? If OP is fine with it, then MouseGetPos is not a bad solution. But to be honest, I think a hook is more robust as it will catch all activities on the mouse, whatever it is. 1 Davidowicza reacted to this Not much of a signature, but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Tool to search content in au3 files Date Range Picker Sudoku Game 2020 Overlapped Named Pipe IPC x64 Bitwise Operations Fast and simple WCD IPC GIF Animation (cached) Share this post Link to post Share on other sites
Davidowicza 18 Posted January 13, 2020 @Nine I agree that your way is much more efficient and reliable but from his response I figured he needed a simpler method to start with. Share this post Link to post Share on other sites