Jump to content

windows 7 'Not Responding'


Recommended Posts

I tried to tackle this about a year ago and gave up..  I write many autoit apps and they all seems to have a similar issue on windows 7. While running, they are always in the 'not responding' status with windows, and now our disk encryption software is popping in and killing my apps due to not responding..

From what I have read, I have to 'Pump the windows message queue' with messages, but I haven't the slightest idea how to do this in autoit.

If anyone has a solution or a though, I would be eternally grateful!

Here is my demo code:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
$Form1 = GUICreate("Crash Test Dummy", 314, 123, 192, 114)
GUICtrlCreateGroup("Crash test", 8, 8, 289, 89)
$Button1 = GUICtrlCreateButton("Do Something", 24, 24, 75, 25)
$Input1 = GUICtrlCreateInput("", 24, 64, 257, 21)
GUISetState(@SW_SHOW)
Msgbox($MB_SYSTEMMODAL,"hey there","Open Task manager, the parent app is 'Running' but the moment you close this box, it will start counting and go to 'Not Responding', even if you click Do Something.")
GUISetState(@SW_ENABLE, $Form1)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
                guictrlsetdata($input1, "0")
            for $i = 1 to 201
            guictrlsetdata($input1, $i)
            $i+=1
            sleep(100)
            next
            sleep(500)
            guictrlsetdata($input1, "0")
    EndSwitch
WEnd

Any thoughts / idea are welcome!!

 

C0d3 is P0etry( ͡° ͜ʖ ͡°)

Link to comment
Share on other sites

That code works just fine for me on Windows 7.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

The code functions fine testing on Windows 7 Pro here.

It is something probably in your environment causing the issue such as the encryption software you mentioned or something other. Some kinds of software do interfere with processes.

If it goes to not responding immediately after closing the Msgbox and with doing nothing else, then I doubt the message queue is the issue.

Link to comment
Share on other sites

Just for confirmation, it also works just fine on WIN7 Enterprise x64 and x32

 

thanks for the heads up.. I'm using WIN7 Enterprise x64 here.. I guess it's time to go corner the guy who makes the computer images here ;)

 

Thanks for the help!

C0d3 is P0etry( ͡° ͜ʖ ͡°)

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

×
×
  • Create New...