Vindicator209 Posted November 11, 2007 Share Posted November 11, 2007 Hello, this has probably been answered before, but how can I make a script crash silently instead of bringing up the error popup? and an extension of that, can I also make it so it can bring up something else, like a message box that just says "critical error"? Thanks [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
Generator Posted November 11, 2007 Share Posted November 11, 2007 Look in the Remark and @error returns to you Then make If statement to handle the error. Link to comment Share on other sites More sharing options...
Vindicator209 Posted November 11, 2007 Author Share Posted November 11, 2007 (edited) Erm, could you give me an example? I made this to try and figure out what you meant.. but... HotKeySet("{F5}","crash") While 1 If @error Then Exit WEnd Func crash() Run("omfge.xhy") ;This file doesn't exist EndFunc EDIT: I Achieved it by using AutoItSetOption("RunErrorsFatal",0) but that only stifles Run() Errors, howabout all of em? Edited November 11, 2007 by MethodZero [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
Generator Posted November 11, 2007 Share Posted November 11, 2007 Example for GUICreate() GUICreate -------------------------------------------------------------------------------- Create a GUI window. GUICreate ( "title" [, width [, height [, left [, top [, style [, exStyle [, parent]]]]]]] ) Parameters title The title of the dialog box. width [optional] The width of the window. height [optional] The height of the window. left [optional] The left side of the dialog box. By default (-1), the window is centered. If defined, top must also be defined. top [optional] The top of the dialog box. Default (-1) is centered style [optional] defines the style of the window. See GUI Control Styles Appendix. Use -1 for the default style which includes a combination of $WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU styles. Some styles are always included: $WS_CLIPSIBLINGS, and $WS_SYSMENU if $WS_MAXIMIZEBOX or $WS_SIZEBOX is specified. exStyle [optional] defines the extended style of the window. See the Extended Style Table below. -1 is the default. parent [optional] The handle of another previously created window - this new window then becomes a child of that window. Return Value Success: Returns a windows handle. Failure: Returns 0 if the window cannot be created and sets @error to 1. Link to comment Share on other sites More sharing options...
Vindicator209 Posted November 11, 2007 Author Share Posted November 11, 2007 (edited) Thanks, I'll use If @error Then Exit Thanks again Edited November 11, 2007 by MethodZero [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] 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