Jump to content

Completing Stopping and Removing a Script


Recommended Posts

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

  • Developers
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

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 ;).

 

Musashi-C64.png

"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

Link to comment
Share on other sites

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?

Musashi-C64.png

"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

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 by ViciousXUSMC
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...