Nanaki Posted September 9, 2008 Share Posted September 9, 2008 Hi, I have a script that has a guictrlcreatepic and guictrlcreatelabel and does nothing else until the user presses escape. However, after leaving it on for hours it exits with a "abnormal program termination". Has anyone any idea why? Thanks in advance, Link to comment Share on other sites More sharing options...
Szhlopp Posted September 9, 2008 Share Posted September 9, 2008 Hi,I have a script that has a guictrlcreatepic and guictrlcreatelabel and does nothing else until the user presses escape. However, after leaving it on for hours it exits with a "abnormal program termination". Has anyone any idea why?Thanks in advance,*Szhlopp cannot see Nanaki's script. This script would be most helpful in helping Nanaki...* RegEx/RegExRep Tester!Nerd Olympics - Community App!Login UDFMemory UDF - "Game.exe+753EC" - CE pointer to AU3Password Manager W/ SourceDataFiler - Include files in your au3!--- Was I helpful? Click the little green '+' Link to comment Share on other sites More sharing options...
trancexx Posted September 9, 2008 Share Posted September 9, 2008 Hi,I have a script that has a guictrlcreatepic and guictrlcreatelabel and does nothing else until the user presses escape. However, after leaving it on for hours it exits with a "abnormal program termination". Has anyone any idea why?Thanks in advance,force majeur? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Nanaki Posted September 9, 2008 Author Share Posted September 9, 2008 Whoops, sorry about that. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> HotKeySet("{ESC}", "TerminateRun") ;create gui GUICreate("Splash", 300, 300, -1, -1, $WS_POPUP+$WS_BORDER, $WS_EX_TOPMOST) Dim $pic = GUICtrlCreatePic(@ScriptDir & "/bg.jpg", 0, 0, 300, 300) Dim $label = GUICtrlCreateLabel("Press ESC to exit", 100, 100, 300, 300, $SS_CENTER+$SS_CENTERIMAGE) GUICtrlSetBkColor($label, $GUI_BKCOLOR_TRANSPARENT) GUISetState(@SW_SHOW) ;loop gui While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then TerminateRun() Sleep(1000) WEnd TerminateRun() ;exit Func TerminateRun() Exit(1) EndFunc It doesn't really do much yet, next show a pic with a label on it. =) Link to comment Share on other sites More sharing options...
Szhlopp Posted September 9, 2008 Share Posted September 9, 2008 Whoops, sorry about that. >_< #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> HotKeySet("{ESC}", "TerminateRun") ;create gui GUICreate("Splash", 300, 300, -1, -1, $WS_POPUP+$WS_BORDER, $WS_EX_TOPMOST) Dim $pic = GUICtrlCreatePic(@ScriptDir & "/bg.jpg", 0, 0, 300, 300) Dim $label = GUICtrlCreateLabel("Press ESC to exit", 100, 100, 300, 300, $SS_CENTER+$SS_CENTERIMAGE) GUICtrlSetBkColor($label, $GUI_BKCOLOR_TRANSPARENT) GUISetState(@SW_SHOW) ;loop gui While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then TerminateRun() Sleep(1000) WEnd TerminateRun() ;exit Func TerminateRun() Exit(1) EndFunc It doesn't really do much yet, next show a pic with a label on it. =) That doesn't have anything in it that would cause it to 'Terminate'. Sometimes an app will die for no known reason I've accidently let scripts run for 4+ hours and they never died. Try running it again. RegEx/RegExRep Tester!Nerd Olympics - Community App!Login UDFMemory UDF - "Game.exe+753EC" - CE pointer to AU3Password Manager W/ SourceDataFiler - Include files in your au3!--- Was I helpful? Click the little green '+' Link to comment Share on other sites More sharing options...
therks Posted September 10, 2008 Share Posted September 10, 2008 But on an unrelated note: You should be BitOR'ing those styles together, not adding them. My AutoIt Stuff | My Github 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