dergula Posted January 13, 2020 Share 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. Link to comment Share on other sites More sharing options...
Nine Posted January 13, 2020 Share 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. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
dergula Posted January 13, 2020 Author Share 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. Link to comment Share on other sites More sharing options...
Nine Posted January 13, 2020 Share 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. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
SkysLastChance Posted January 13, 2020 Share Posted January 13, 2020 (edited) <Read> Edited January 13, 2020 by SkysLastChance You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott Link to comment Share on other sites More sharing options...
dergula Posted January 13, 2020 Author Share 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. Link to comment Share on other sites More sharing options...
Davidowicza Posted January 13, 2020 Share Posted January 13, 2020 Start off by looking at MouseGetPos(), TimerInit(), and ProcessClose() functions. Link to comment Share on other sites More sharing options...
Somerset Posted January 13, 2020 Share Posted January 13, 2020 Be aware that some "scripts that kill processes" can be flagged as false positives on some antivirus. Link to comment Share on other sites More sharing options...
Nine Posted January 13, 2020 Share 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. Davidowicza 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Davidowicza Posted January 13, 2020 Share 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now