Jump to content
Sign in to follow this  
dantay9

Script goes crazy!

Recommended Posts

dantay9

The script works as it is supposed to when it is running. But when I decide to close the script my computer goes crazy. Explorer.exe takes up most of the RAM and CPU usage (around 96%). It always happens when I exit the script. I got the callback and hook from a script on the forum. I think that is the problem, but I don't know how to use them so I can't fix them. Make sure you take a look at the script before you run it. Task Manager can take a few minutes to come up when the CPU is overloaded. Please help me.

New_AutoIt_v3_Script.au3


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites
martin

The script works as it is supposed to when it is running. But when I decide to close the script my computer goes crazy. Explorer.exe takes up most of the RAM and CPU usage (around 96%). It always happens when I exit the script. I got the callback and hook from a script on the forum. I think that is the problem, but I don't know how to use them so I can't fix them. Make sure you take a look at the script before you run it. Task Manager can take a few minutes to come up when the CPU is overloaded. Please help me.

I am glad you warned us!

I managed to make it run without the problem and I think the main change which did it was removing the style $WS_EX_LAYERED from the child window $GUI1. (Not allowed for a child.)

If that doesn't fix it then I'll look at what other changes I made.

You could also change this

_WinAPI_SetWindowLong($hWnd, $GWL_STYLE, BitOR($Style, Hex($SS_ICON)))

to

_WinAPI_SetWindowLong($hWnd, $GWL_STYLE, BitOR($Style, $SS_ICON))

though only because I don't think the Hex conversion is useful.

Edited by martin

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
dantay9

Thanks martin. The $WS_EX_LAYERED attribute was the problem. Thanks for the hex tip too.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
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
Sign in to follow this  

×