Jump to content

simple script crashing internet


Recommended Posts

I have a script i use for a game, all it does is click the left mouse button 10 tims per second. It used to work fine before, but now whenever i open the file, my internet crashes (just on the computer running autoit) and i have to restart my computer. I've never modified the file or opened it until recently to get help with this. I've reinstalled autoit twice. The first time after reinstalling it worked fine again. I only used it that once and then a week later or so my internet crashed again when i used it. After reinstalling it again today it still crashes the internet. Autoit works fine for the example scripts, and i copy/pasted a similar script that someone uses for the same purpose and it works fine. Here is the script that I'm having problems with:

Global $Paused

HotKeySet("{END}", "TogglePause")

HotKeySet("{HOME}", "Terminate")

While 1

Sleep(100)

WEnd

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

MouseClick("Left")

WEnd

EndFunc

Func Terminate()

Exit 0

EndFunc

here is the similar one that is currently working:

Global $Paused

HotKeySet("{END}", "TogglePause")

HotKeySet("{HOME}", "Terminate")

HotKeySet("{INSERT}", "Chicken")

While 1

Sleep(100)

WEnd

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(20)

MouseClick("Left")

WEnd

EndFunc

Func Chicken()

$Paused = 1

Send('{ESC}')

Sleep(50)

Send('{UP}')

Send('{ENTER}')

EndFunc

Func Terminate()

Exit 0

EndFunc

can someone tell me what it is in the first script that crashes my internet?

Link to comment
Share on other sites

no problem here

Global $Paused
HotKeySet("{END}", "TogglePause")
HotKeySet("{HOME}", "Terminate")

While 1
    Sleep(100)
WEnd

Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        MouseClick("Left")
    WEnd
EndFunc  ;==>TogglePause

Func Terminate()
    Exit 0
EndFunc  ;==>Terminate

8)

NEWHeader1.png

Link to comment
Share on other sites

ok i guess my computer just dosn't like it then.

The GAME may be crashing your machine, perhaps intentionally on detection of automated input. Since your script does not make reference to the window name or anything particular to the game, run the script without the game (some other thing open, like the AutoIT home page, or a different game) and see if anything goes wrong. Valuater has shown it had no effect on his machine, and I'm betting it won't on yours either, provided that game is not active.

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

But he said it used to work for him so it probably isn't the game crashing it.

I thought about that while typing, but figured conditions may have changed, being an online game. Hosting code is constantly being tweaked for cheat blocking. But it may not be the game.

I'm still interested if the script causes any other online activity besides that particular game to crash.

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

  • 2 weeks later...

thanks for the responses, i think it has something to do with my computer itself...probably need a bigger power supply. the new script is still working fine, but i think it crashed my internet once. i've been having other problems with my internet regarding my modem...so ya i need to get some things checked out. thanks again!

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