Jump to content

How to make Toast - New version 2 Aug 18


Melba23
 Share

Recommended Posts

  • Moderators

katoNkatoNK,

it gives an include error

What error do you get? :huh2:

Have you tried with StringSize in the same folder as the Toast UDF? ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Download this >> http://www.autoitscript.com/forum/index.php?showtopic=114034 and place in the same folder.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

  • 2 months later...
  • 4 months later...

Hi,

I want to create a toast to my entire screen(i mean the height and width of the toast should be based on my screen height and width size). is that possible to do? any suggestion for me ?

Edited by Syed23

Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font]

Link to comment
Share on other sites

  • Moderators

Syed23,

As so much of the Toast UDF is taken up by code to make the GUI as small as possible, I cannot really see the point in altering it to become very large. ;)

I would suggest using something along these lines (credit to Gary Frost): :)

#include-once

; Declare AnimateWindow constants
Global Const $AW_FADE_IN  = 0x00080000
Global Const $AW_FADE_OUT = 0x00090000
Global Const $AW_EXPLODE  = 0x00040010
Global Const $AW_IMPLODE  = 0x00050010
Global Const $AW_SLIDE_IN_LEFT    = 0x00040001
Global Const $AW_SLIDE_OUT_LEFT   = 0x00050002
Global Const $AW_SLIDE_IN_RIGHT   = 0x00040002
Global Const $AW_SLIDE_OUT_RIGHT  = 0x00050001
Global Const $AW_SLIDE_IN_TOP     = 0x00040004
Global Const $AW_SLIDE_OUT_TOP    = 0x00050008
Global Const $AW_SLIDE_IN_BOTTOM  = 0x00040008
Global Const $AW_SLIDE_OUT_BOTTOM = 0x00050004
Global Const $AW_DIAG_SLIDE_IN_TOPLEFT      = 0x00040005
Global Const $AW_DIAG_SLIDE_OUT_TOPLEFT     = 0x0005000A
Global Const $AW_DIAG_SLIDE_IN_TOPRIGHT     = 0x00040006
Global Const $AW_DIAG_SLIDE_OUT_TOPRIGHT    = 0x00050009
Global Const $AW_DIAG_SLIDE_IN_BOTTOMLEFT   = 0x00040009
Global Const $AW_DIAG_SLIDE_OUT_BOTTOMLEFT  = 0x00050006
Global Const $AW_DIAG_SLIDE_IN_BOTTOMRIGHT  = 0x0004000A
Global Const $AW_DIAG_SLIDE_OUT_BOTTOMRIGHT = 0x00050005

; #FUNCTION# =========================================================================================================
; Name...........: _WinAnimate
; Description ...: Animates windows by sliding, fading or exploding in/out
; Syntax.........: _WinAnimate($v_gui, $i_mode, [$i_duration])
; Parameters ....: $v_gui       -> Either handle or title of window to animate
;                  $i_mode      -> $AW constant from above
;                  $i_duration  -> Speed of animation (higher = slower)
; Requirement(s).: v3.2.12.1 or higher
; Return values .: Success:     Returns 1
;                  Failure:    Returns 0, Error 1 = DLL call fail, Error 2 = OS version incapable
; Author ........: Gary Frost
; Example........;  Yes
;=====================================================================================================================

Func _WinAnimate($h_gui, $i_mode, $i_duration = 1000)

    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

EndFunc ;==> $RetValue = _WinAnimate()

; Example

$hwnd = GUICreate("AnimateWindow - Demo", @DesktopWidth, @DesktopHeight - 40, 0, 0)
GUISetBkColor(0xFFFF00)
$RetValue = _WinAnimate($hwnd, $AW_FADE_IN)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_FADE_OUT)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_EXPLODE)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_IMPLODE)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_SLIDE_IN_LEFT)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_SLIDE_OUT_LEFT)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_SLIDE_IN_RIGHT)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_SLIDE_OUT_RIGHT)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_SLIDE_IN_TOP)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_SLIDE_OUT_TOP)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_SLIDE_IN_BOTTOM)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_SLIDE_OUT_BOTTOM)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_DIAG_SLIDE_IN_TOPLEFT)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_DIAG_SLIDE_OUT_TOPLEFT)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_DIAG_SLIDE_IN_TOPRIGHT)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_DIAG_SLIDE_OUT_TOPRIGHT)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_DIAG_SLIDE_IN_BOTTOMLEFT)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_DIAG_SLIDE_OUT_BOTTOMLEFT)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_DIAG_SLIDE_IN_BOTTOMRIGHT)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)
Sleep(1500)
$RetValue = _WinAnimate($hwnd, $AW_DIAG_SLIDE_OUT_BOTTOMRIGHT)
ConsoleWrite($RetValue & "   " & "Err: " & @error & "   " & "Ext: " & @extended & @CRLF)

Exit

Have fun! :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Hannes123,

I have no idea why running the UDF in an the RDP session produces the Toast in the wrong vertical location. I can only imagine that UDF misreads the position of the remote taskbar in some way, but as I do not use RDP I cannot really suggest any way to get round it. :).

I have the same issue in windows 7 x64. The toast appears in the wrong vertical position when the taskbar is in vertical position. It appears at the start menu position. When I use the toast on a computer using Aero theme or Windows 7 basic theme, there is no problem, but the problem appears on computers running Windows classic theme.

I'll look into it when I have time. Anyway, very nice script, thanks Melba!

Edited by jmon
Link to comment
Share on other sites

  • Moderators

jmon,

If you find an answer please let me know - I run Vista x86 so I cannot do any detective work myself. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I don't think this is a x64 issue and probably can be replicated on Vista x32 too. For example when I have 'Classic mode' enabled and I move the taskbar to the top WinGetPos returns the following values >>

[0] = -2

[1] = -2

[2] = 1370 ; @DesktopWidth is 1366

[3] = 30

but when I'm using Aero the results are different >>

[0] = 0

[1] = 0

[2] = 1366 ; @DesktopWidth is 1366

[3] = 30

As you can see the first difference is the position of the taskbar, the second problem is @DesktopWidth has a difference of 4px, but in Aero mode this is the same value (I would expect that because it spans the width of the monitor!) Therefore the logical solution (after 30mins of staring at my screen) was to calculate the offset difference of X and Y, multiply by 2 and subtract from @DesktopWidth/Height e.g. -2 * 2 = -4 and then 1366 - -4 = 1370 the new desktop width.

Hope this helps.

Fixed: _Toast_Locate()

; #INTERNAL_USE_ONLY#============================================================================================================
; Name...........: _Toast_Locate
; Description ...: Find Systray and determine Toast start position and movement direction
; Syntax ........: _Toast_Locate($iToast_Width, $iToast_Height)
; Parameters ....: $iToast_Width  - required width of slice
;                  $iToast_Height - required height of slice
; Author ........: Melba23, based on some original code by GioVit
; Modified.......: guinness to work with Classic Theme mode on Windows Vista+
; Remarks .......: This function is used internally by _Toast_Show
; ===============================================================================================================================
Func _Toast_Locate($iToast_Width, $iToast_Height)

    ; Define return array
    Local $aToast_Data[3]

    ; Workaround for Windows Vista+ Classic Theme mode, as @DesktopHeight/Width return different values
    Local $iDiff = 0

    ; Find systray
    Local $iPrevMode = Opt("WinTitleMatchMode", 4)
    Local $aTray_Pos = WinGetPos("[CLASS:Shell_TrayWnd]")
    Opt("WinTitleMatchMode", $iPrevMode)

    ; If error in finding systray
    If Not IsArray($aTray_Pos) Then Return SetError(2, 0, -1)

    ; Workaround for Windows Vista+ Classic Theme mode
    For $i = 0 To 1
        If $aTray_Pos[$i] < 0 Then
            $iDiff = ($aTray_Pos[$i] * 2)
            $aTray_Pos[$i] = 0
        EndIf
    Next

    ; Get the height & width of the main desktop as well as subtracting the offset difference
    Local $iDesktopHeight = @DesktopHeight - $iDiff, $iDesktopWidth = @DesktopWidth - $iDiff

    ; Determine direction of Toast motion and starting position
    If $aTray_Pos[1] > 0 Then
        $iToast_Move = 0x00050004 ; $AW_SLIDE_OUT_BOTTOM
        $aToast_Data[0] = $iDesktopWidth - $iToast_Width - 10
        $aToast_Data[1] = $aTray_Pos[1] - $iToast_Height
        $aToast_Data[2] = 0x00040008 ; $AW_SLIDE_IN_BOTTOM
    ElseIf $aTray_Pos[0] > 0 Then
        $iToast_Move = 0x00050001 ; $AW_SLIDE_OUT_RIGHT
        $aToast_Data[0] = $aTray_Pos[0] - $iToast_Width
        $aToast_Data[1] = $iDesktopHeight - $iToast_Height - 10
        $aToast_Data[2] = 0x00040002 ; $AW_SLIDE_IN_RIGHT
    ElseIf $aTray_Pos[2] = $iDesktopWidth Then
        $iToast_Move = 0x00050008 ; $AW_SLIDE_OUT_TOP
        $aToast_Data[0] = $iDesktopWidth - $iToast_Width - 10
        $aToast_Data[1] = $aTray_Pos[1] + $aTray_Pos[3]
        $aToast_Data[2] = 0x00040004 ; $AW_SLIDE_IN_TOP
    ElseIf $aTray_Pos[3] = $iDesktopHeight Then
        $iToast_Move = 0x00050002 ; $AW_SLIDE_OUT_LEFT
        $aToast_Data[0] = $aTray_Pos[0] + $aTray_Pos[2]
        $aToast_Data[1] = $iDesktopHeight - $iToast_Height - 10
        $aToast_Data[2] = 0x00040001 ; $AW_SLIDE_IN_LEFT
    EndIf

    Return $aToast_Data

EndFunc   ;==>_Toast_Locate
Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

  • Moderators

jmon,

I hve located the problem and it is easy to fix. ;)

Thanks to guinness' detective work it seems the taskbar is bigger when in Classic - so the comparisons of $aTray_Pos[2] = $iDesktopWidth and $aTray_Pos[3] = $iDesktopHeight in the _Toast_Locate function were not met when locating the Toast and it defaulted to 0,0. I need to change both comparisons to >= so that they fire when in Classic. I will get a new version out soon - but see below. Thanks for finding the bug. :)

guinness,

Thanks for determining the different taskbar size in Classic - that was the key. I am not however completely convinced by the change you have proposed - I can see why there needs to be a small correction to the position when the taskbar is at the top and to the right in Classic, but at the moment I do not think your suggestion completely solves the problem. I will need to investigate further. :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I tested the workaround by running Toast_Example.au3 and moving the taskbar around at the same time, with all of the examples it positioned correctly. I didn't want to change the function too much as I didn't know how you would feel if I were change the If...ElseIf...EndIf statement or completely re-write the function.

Let me know what you decide. :)

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

If I could make a small suggestion or feature request, in the positioning could you have an option to take account of the screen work area? I have RocketDock right over the tray area and it's partially obscured when toast comes up. I wrote a little utility that sets the work area so that maximized windows don't obscure RocketDock.

post-31149-0-42462200-1324194319_thumb.j

Link to comment
Share on other sites

  • Moderators

MilesAhead,

I am looking at the positioning of the Toast at the moment (see the threads above) so I will see what I can do for you - but no promises. ;)

Can you post (or PM) your script showing how you changed the work area so I do not develop something which does not work for you. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Sure. I'm using this code:

Func _SetDesktopWorkArea($left, $top, $right, $bottom)
Local Const $SPI_SETWORKAREA = 47
Local Const $SPI_GETWORKAREA = 48
Local $tRcWA = DllStructCreate($tagRECT)

DllStructSetData($tRcWA, "Left", $left)
DllStructSetData($tRcWA, "Top", $top)
DllStructSetData($tRcWA, "Right", $right)
DllStructSetData($tRcWA, "Bottom", $bottom)

Return _WinAPI_SystemParametersInfo($SPI_SETWORKAREA, 0, DllStructGetPtr($tRcWA))
EndFunc   ;==>_SetDesktopWorkArea
Link to comment
Share on other sites

  • Moderators

jmon,

The fix I mentioned in post #92 above will work on the current version so you can just amend your copy to tide you over. :)

The new version I am working on at the moment uses an entirely different method of locating the Toast so I am hopeful it will satisfy both you and MilesAhead. Keep an eye open for it. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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