Crash Posted January 17, 2010 Share Posted January 17, 2010 What is the script to make a tiny square pop up above the taskbar near the clock. I mean just like when someone signs in Windows Live Messenger, you'll get a pop up as in the picture below: JPGRAR | Mouse Lock | My website | Thanks so much for your help! ❤️ Link to comment Share on other sites More sharing options...
Mat Posted January 17, 2010 Share Posted January 17, 2010 A GUI. You can get the position by usingWinGetPos("[class:Shell_TrayWnd]")And then get the side something like this:Func _TaskBarGetSide () Local $aPos = WinGetPos("[class:Shell_TrayWnd]") If $aPos[0] < 10 Then If $aPos[2] > 200 Then Return "Left" Return "Top" EndIf If $aPos[3] > 200 Then Return "Right" Return "Bottom" EndFunc ; ==> _TaskBarGetSideNo idea how well it works (if at all), I wrote it quite a while ago as part of this UDF. As for the GUI, you will need to then mess around with styles and background images, and where you want to put it. AutoIt Project Listing Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 17, 2010 Moderators Share Posted January 17, 2010 Crash, Here is one I wrote a while ago: expandcollapse popup#include <WindowsConstants.au3> #Include <WinAPI.au3> ; Create Toast window Global $hGUI = GUICreate("", 200, 100, @DesktopWidth - 210, @DesktopHeight - 130, $WS_POPUPWINDOW, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) Global $hLabel = GUICtrlCreateLabel("Click to close", 1, 1, 198, 198) ; Slide in Toast - but keep focus on current window _WinAnimate($hGUI, 0x00040008) $hCurrWnd = _WinAPI_GetForegroundWindow() GUISetState(@SW_SHOW, $hGUI) WinActivate($hCurrWnd, "") ; Wait for click from Toast While 1 Local $aMsg = GUIGetMsg(1) If $aMsg[1] = $hGUI And $aMsg[0] = $hLabel Then ExitLoop WEnd ; Slide out window _WinAnimate($hGUI, 0x00050004) Exit ; -------------- ; Gary Frost's WinAnimate function Func _WinAnimate($h_gui, $i_mode, $i_duration = 1000) If @OSVersion = "WIN_XP" OR @OSVersion = "WIN_2000" Or @OSVersion = "WIN_VISTA" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $h_gui, "int", $i_duration, "long", $i_mode) Local $ai_gle = DllCall('kernel32.dll', 'int', 'GetLastError') If $ai_gle[0] <> 0 Then Return SetError(1, 0, 0) EndIf Return 1 Else Return SetError(2, 0, 0) EndIf EndFunc;==> _WinAnimate() M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Mat Posted January 17, 2010 Share Posted January 17, 2010 Here is one I wrote a while ago: Nice Now you just need to find out where the taskbar is rather than assuming that its at the bottom... AutoIt Project Listing Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 17, 2010 Moderators Share Posted January 17, 2010 Mat, Do you want to see the full UDF? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Mat Posted January 17, 2010 Share Posted January 17, 2010 expandcollapse popup$hGUI = _TrayPopup_Create(300, 100) GUISetBkColor(0xFF00FF) GUICtrlCreateLabel("Testing testing 123!!", 2, 2, 296, 96) GUICtrlSetFont(-1, 28, 700) _TrayPopup_SlideIn($hGUI) GUISetState() Sleep(1000) _TrayPopup_SlideOut($hGUI) Func _TrayPopup_Create($nWidth, $nHeight, $nOffset = 4) Local $aPos = WinGetPos("[class:Shell_TrayWnd]"), $y, $x Switch _TaskBarGetSide() Case "Bottom" $y = $aPos[1] - $nHeight - $nOffset $x = @DesktopWidth - $nWidth - $nOffset Case "Left" $y = @DesktopHeight - $nHeight - $nOffset $x = $aPos[2] + $nOffset Case "Top" $y = $aPos[3] + $nOffset $x = @DesktopWidth - $nWidth - $nOffset Case "Right" $y = @DesktopHeight - $nHeight - $nOffset $x = $aPos[0] - $nWidth - $nOffset EndSwitch ConsoleWrite($x & ", " & $y & @CRLF & _TaskBarGetSide() & @CRLF) Return GUICreate("TrayPopupWnd", $nWidth, $nHeight, $x, $y, -2147483648, 136) EndFunc ;==>_TrayPopup_Create Func _TaskBarGetSide() Local $aPos = WinGetPos("[class:Shell_TrayWnd]") If $aPos[0] < 10 Then If $aPos[2] > 200 Then Return "Bottom" Return "Right" EndIf If $aPos[3] > 200 Then Return "Left" Return "Top" EndFunc ;==>_TaskBarGetSide ; Gary Frost's WinAnimate function ; 0x00040001 ; slide in from left ; 0x00050002 ; slide out to left ; 0x00040002 ; slide in from right ; 0x00050001 ; slide out to right ; 0x00040004 ; slide-in from top ; 0x00050008 ; slide-out to top ; 0x00040008 ; slide-in from bottom ; 0x00050004 ; slide-out to bottom Func _TrayPopup_SlideIn($h_gui, $i_duration = 1000) Local $i_mode Switch _TaskBarGetSide() Case "Bottom" $i_mode = 0x00040008 Case "Left" $i_mode = 0x00040001 Case "Top" $i_mode = 0x00040004 Case "Right" $i_mode = 0x00040002 EndSwitch If @OSVersion = "WIN_XP" Or @OSVersion = "WIN_2000" Or @OSVersion = "WIN_VISTA" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $h_gui, "int", $i_duration, "long", $i_mode) Local $ai_gle = DllCall('kernel32.dll', 'int', 'GetLastError') If $ai_gle[0] <> 0 Then Return SetError(1, 0, 0) EndIf Return 1 Else Return SetError(2, 0, 0) EndIf EndFunc ;==>_TrayPopup_SlideIn Func _TrayPopup_SlideOut($h_gui, $i_duration = 1000) Local $i_mode Switch _TaskBarGetSide() Case "Bottom" $i_mode = 0x00050004 Case "Left" $i_mode = 0x00050002 Case "Top" $i_mode = 0x00050008 Case "Right" $i_mode = 0x00050001 EndSwitch If @OSVersion = "WIN_XP" Or @OSVersion = "WIN_2000" Or @OSVersion = "WIN_VISTA" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $h_gui, "int", $i_duration, "long", $i_mode) Local $ai_gle = DllCall('kernel32.dll', 'int', 'GetLastError') If $ai_gle[0] <> 0 Then Return SetError(1, 0, 0) EndIf Return 1 Else Return SetError(2, 0, 0) EndIf EndFunc ;==>_TrayPopup_SlideOut AutoIt Project Listing Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 17, 2010 Moderators Share Posted January 17, 2010 Mat, Pretty snazzy. Look in the Examples forum in a little while. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Mat Posted January 17, 2010 Share Posted January 17, 2010 Pretty snazzy. Look in the Examples forum in a little while. I'll be waiting AutoIt Project Listing 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