Jump to content

Special Error Message with effects


JustinReno
 Share

Recommended Posts

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:

#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

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

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 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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...