JohnOne Posted April 10, 2014 Posted April 10, 2014 (edited) I often see those little toastie info pop ups coming from my tray, they fade out but if clicked come back. Like "Oops, I never meant to exit that script." Never seen one around the forum so made one up. expandcollapse popup#include <GUIConstantsEx.au3> ;Set hotkey to exit immediately HotKeySet('{ESC}', '_ExitQ') Global Const $TOASTIE_STYLE_UP = BitOR(0x00040000, 0x00000008) Global $hWnd = GUICreate('Exit?', 300, 200, @DesktopWidth - 320, @DesktopHeight - 240) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hWnd, "int", 250, "long", $TOASTIE_STYLE_UP) GUISetState(@SW_SHOWNOACTIVATE, $hWnd) While 3 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE _ExitQ() EndSwitch WEnd Func _ExitQ() If @HotKeyPressed Then Exit ;Fine tune Local $iSpeed = -1 Local $iSleep = 10 ;Loop down setting transparency as we go For $i = 255 To 0 Step $iSpeed WinSetTrans($hWnd, '', $i) Sleep($iSleep) ;If Primary mouse button clicked on gui client area ;before finished, reset transparency and do not exit If GUIGetMsg() = $GUI_EVENT_PRIMARYDOWN Then WinSetTrans($hWnd, '', 255) Return EndIf Next Exit EndFunc ;==>_ExitQ Edited April 10, 2014 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
water Posted April 10, 2014 Posted April 10, 2014 Doesn't Melba's "How to make Toast" UDF do something similar? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
JohnOne Posted April 10, 2014 Author Posted April 10, 2014 Not sure, doesn't mention it in initial post though. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Chimaera Posted April 10, 2014 Posted April 10, 2014 Its good, one small comment though It seems to root itself at the bottom of the screen and covers over my taskbar icons, they are still accessible, maybe it should attach to the top of the taskbar instead? So you dont get the edge boundry lines showing across the taskbar If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices()
JohnOne Posted April 10, 2014 Author Posted April 10, 2014 Absolutely agree, there's some great ways of detecting taskbar and such. Could be a great exercise for someone wanting to adapt it. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
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