JustinReno Posted October 5, 2007 Share Posted October 5, 2007 Well, I've tried to look this up before, but nothing came up. I know someone talked about it before but, yeah. So, This "Special" error message does what Windows XP does when you select shutdown, in a crappier animation.. Here is the code: Its not very efficent either: expandcollapse popup#NoTrayIcon #Include <A3LScreenCap.au3> #Include <GuiConstants.au3> #Include <Misc.au3> #cs Title: Error Screen Message. File Name: ScreenError.au3. Description: To use to make an important message. Author: Justin Reno. Version: 1.0 #ce ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Function Name: ScreenError() ;; ;; Description: Creates a special Windows message. ;; ;; Parameter(s): $CursorTF = A true of false question, do you want the mouse to be displayed in the screenshot? ;; ;; $LabelMsg = The message of the error. ;; ;; $Sound = What sound you want played when the error pops up. ;; ;; $BKColor = What is the backround color of the outside of the message. ;; ;; Requirement(s): AutoItV3 V3.2 or higher. ;; ;; Author(s): Justin Reno ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ScreenError(False, "WINDOWS ERROR: 0x00000 could not be read by 0x99FF0. Application will now terminate.", "C:\WINDOWS\MEDIA\WINDOWS XP CRITICAL STOP.wav") Func ScreenError($CursorTF, $LabelMsg, $Sound, $BKColor = 0XC9C9C9) _ScreenCap_Capture(@ScriptDir&"\blah.jpg", -1, -1, -1, -1, $CursorTF) $gui = GUICreate("", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP + $WS_BORDER, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) $image = GUICtrlCreatePic(@ScriptDir&"\blah.jpg", 0, 0, @DesktopWidth, @DesktopHeight) $Gui2 = GuiCreate("", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP + $WS_BORDER, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) WinSetTrans($Gui2, "", 150) GuiSetBKColor($BKColor, $Gui2) $Gui3 = GuiCreate("Simple Web Browser", 200, 200, -1, -1, $WS_POPUP + $WS_BORDER, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) GuiCtrlCreateLabel($LabelMsg, 0, 0, 200, 150) $ButtonOK = GuiCtrlCreateButton("Ok", 0, 150, 200, 50) GuiSetState(@SW_Show, $Gui) GuiSetState(@SW_Show, $Gui2) SoundPlay($Sound, 0) GuiSetState(@SW_Show, $Gui3) $Gui3Pos = WinGetPos($Gui3) _MouseTrap($Gui3Pos[0], $Gui3Pos[1], $Gui3Pos[0] + $Gui3Pos[2], $Gui3Pos[1] + $Gui3Pos[3]) While 1 If GuiGetMsg() = $ButtonOK Then FileDelete(@ScriptDir&"\blah.jpg") _MouseTrap() Exit EndIf WEnd EndFunc Link to comment Share on other sites More sharing options...
gseller Posted October 5, 2007 Share Posted October 5, 2007 Cute! It only lets the mouse go within its little box... Link to comment Share on other sites More sharing options...
JohnBailey Posted October 5, 2007 Share Posted October 5, 2007 Creative idea with the screencap A decision is a powerful thing Link to comment Share on other sites More sharing options...
JustinReno Posted October 6, 2007 Author Share Posted October 6, 2007 Yeah, its ok. I'm not good with multiple GUIs. Link to comment Share on other sites More sharing options...
crzftx Posted October 6, 2007 Share Posted October 6, 2007 So you basically made a function which plays a sound, at my pick, displays a message, at my pick, and lets me look at a slightly grayed out screenshot? well you proved you can do it, if that was your goal. Otherwise....? Link to comment Share on other sites More sharing options...
JustinReno Posted October 6, 2007 Author Share Posted October 6, 2007 As the first post said, that was my goal. Link to comment Share on other sites More sharing options...
AlmarM Posted October 6, 2007 Share Posted October 6, 2007 Can u plase post the includes to ?? I dont have them ^^ Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
crzftx Posted October 6, 2007 Share Posted October 6, 2007 The includes are in Auto3Lib. Link to comment Share on other sites More sharing options...
AlmarM Posted October 6, 2007 Share Posted October 6, 2007 Where can I find it ? Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
crzftx Posted October 6, 2007 Share Posted October 6, 2007 Click Downloads in the Forum upper right corner, go to libraries, click Auto3Lib. There are some errors, read the last about 20 posts... Link to comment Share on other sites More sharing options...
AlmarM Posted October 6, 2007 Share Posted October 6, 2007 (edited) Where can I find the A3LSceenCap?? I cant find it... Can some1 post it for me ?? (I have downloaded the A3L Stuff) EDIT: I downloaded the A3L_Zip on the 1st page.. I need to have that one ?? Because I saw i missed A3LString and A3LHeader too Edited October 6, 2007 by AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
crzftx Posted October 6, 2007 Share Posted October 6, 2007 not the A3L zip from the first page, but... wait, actually just post your question in the A3L topic. It will get quicker [and better] answers. We shouldn't be posting about something unrelated to Justin's original topic here anyway. 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