geezersoze Posted January 27, 2020 Share Posted January 27, 2020 Greetings, Rushed into AutoIT scripting today to solve a minor problem, as my system admins lock my computer after 15 minutes of inactivity, and I wanted to have my cursor shift every now and then to prevent my system from going idle. I want to stop this script entirely, as now when I try to work, I can't get the cursor to stop jumping around my screen. Any help is greatly appreciated. Here's the script: While 1 Sleep(60000) $CurPos = MouseGetPos ( ) MouseMove ( $CurPos[0] + 10, $CurPos[1] ) MouseMove ( $CurPos[0] - 10, $CurPos[1] ) WEnd I have tried using a HotKeySet function, and it hasn't helped. I have attempted to drop in a Pause/Terminate Function, which also has not solved my problem. I have combed this forum, but there only appears to be solutions to longer lines of code that would maintain other functions running, and I just want to completely remove this script from my system. I have found a better solution but this is destroying my ability to work on this machine. Please help! Link to comment Share on other sites More sharing options...
Developers Jos Posted January 27, 2020 Developers Share Posted January 27, 2020 20 minutes ago, geezersoze said: I have tried using a HotKeySet function, and it hasn't helped. I have attempted to drop in a Pause/Terminate Function, which also has not solved my problem. Don't know what you did, but the example in the helpfile is more or less what you need, so show your implementation of HotKeySet(). Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Musashi Posted January 27, 2020 Share Posted January 27, 2020 12 minutes ago, geezersoze said: I just want to completely remove this script from my system. I have found a better solution but this is destroying my ability to work on this machine. Please help! Since your script seems to 'survive' a restart of Windows, you probably added it to the startup folder (autostart). The way to remove it from there depends on your version of Windows. Probably the safest thing to do would be to ask your admin . "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
Deye Posted January 27, 2020 Share Posted January 27, 2020 Try and see how _WinAPI_GetIdleTime() may be useful to you Link to comment Share on other sites More sharing options...
Nine Posted January 27, 2020 Share Posted January 27, 2020 You mean you want to remove your own script from your own system, that you have written on your own ? Try the DOS command : del MyScript.* TheXman and Musashi 2 “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...
Musashi Posted January 27, 2020 Share Posted January 27, 2020 3 minutes ago, Nine said: You mean you want to remove your own script from your own system, that you have written on your own ? I guess that's exactly what @geezersoze wants, so deleting the program would of course be the easiest solution. Normally the script would be terminated at the latest, when the computer is shut down. So I assume that it will be restarted when the system is rebooted. In this case it might be advisable to remove the autostart entry as well, or what would you recommend? "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
geezersoze Posted January 28, 2020 Author Share Posted January 28, 2020 Had to do things my own way. Uninstalled AutoIT, which did not resolve the problem, but was able to open task manager and stop the running script manually by ending task. Problem solved, and back to sanity. Thanks for the input, everybody. Link to comment Share on other sites More sharing options...
ViciousXUSMC Posted January 28, 2020 Share Posted January 28, 2020 (edited) A couple of things. Sleep is a blocking function. So avoid that if you can. Two, no need to move 10 pixels. Just one will do and would probably have been so minor that you would not have noticed it. Three you captured the position once added 10 to it, but then instead of sending the cursor back to the original position, you sent it to the original location minus 10 Id recommend you look up hotkeyset() and set an exit function Also use AdlibRegister() instead of sleep to repeat a function for the cursor move as your hotkey wont work if your in a sleep state to exit. Lastly, your script should be running in the tool tray, you can just right click it and say exit. Edited January 28, 2020 by ViciousXUSMC Link to comment Share on other sites More sharing options...
argumentum Posted January 29, 2020 Share Posted January 29, 2020 On 1/27/2020 at 2:55 PM, geezersoze said: my system admins lock my computer after 15 minutes of inactivity don't loose your job over a locked PC TheXman and Earthshine 2 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Earthshine Posted January 29, 2020 Share Posted January 29, 2020 Doesn’t sound like you’re working too much if your screen locks every 15 minutes and you’re complaining about it. You’re not really busy and you’re not really using the computer anyway argumentum and TheXman 2 My resources are limited. You must ask the right questions 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