Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

How to make Toast - BugFix version 16 Jul 14


  • Please log in to reply
249 replies to this topic

#81 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 21,262 posts

Posted 09 June 2011 - 08:27 AM

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
StringSize - Automatically size controls to fit text                                                               ExtMsgBox - A user customisable replacement for MsgBox
Toast - Small GUIs which pop out of the Systray                                                                Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command                                   GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI                                      NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure      Notify - Small notifications on the edge of the display
Date_Time_Convert - Easily convert date/time formats, including the language               GUIListViewEx - Insert, delete, move, drag, sort and edit ListView items







#82 katoNkatoNK

katoNkatoNK

    Wayfarer

  • Active Members
  • Pip
  • 94 posts

Posted 10 June 2011 - 01:27 PM

yep, i tried that and it was sorted.. didn't make sense that it would work that way at first :huh2:

#83 zappa

zappa

    Seeker

  • New Members
  • 4 posts

Posted 11 June 2011 - 10:24 PM

I don't understand how to use it. I try to compile the script but I get this error:


StringSize.au3'


I'm using the latest version of AutoIt. any suggestion? i'm new to all this..

#84 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,238 posts

Posted 11 June 2011 - 10:26 PM

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

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 30/07/2014


#85 roka

roka

    Seeker

  • Active Members
  • 22 posts

Posted 12 August 2011 - 07:14 PM

very cool. I like toast! good job!

#86 Syed23

Syed23

    Mass Spammer! - It's Me

  • Active Members
  • PipPipPipPipPipPip
  • 544 posts

Posted 14 December 2011 - 06:00 PM

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, 14 December 2011 - 06:01 PM.

Thank you,Regards,K.Syed Ibrahim.

#87 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 21,262 posts

Posted 14 December 2011 - 06:15 PM

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): :)
AutoIt         
#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
StringSize - Automatically size controls to fit text                                                               ExtMsgBox - A user customisable replacement for MsgBox
Toast - Small GUIs which pop out of the Systray                                                                Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command                                   GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI                                      NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure      Notify - Small notifications on the edge of the display
Date_Time_Convert - Easily convert date/time formats, including the language               GUIListViewEx - Insert, delete, move, drag, sort and edit ListView items

#88 Syed23

Syed23

    Mass Spammer! - It's Me

  • Active Members
  • PipPipPipPipPipPip
  • 544 posts

Posted 14 December 2011 - 06:18 PM

wow.... This what all i am looking for .... Melba rockzzz always :) Thanks a lot!
Thank you,Regards,K.Syed Ibrahim.

#89 jmon

jmon

    Adventurer

  • Active Members
  • PipPip
  • 108 posts

Posted 16 December 2011 - 10:58 AM

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, 16 December 2011 - 10:59 AM.


#90 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 21,262 posts

Posted 16 December 2011 - 10:59 AM

jmon,

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

M23
StringSize - Automatically size controls to fit text                                                               ExtMsgBox - A user customisable replacement for MsgBox
Toast - Small GUIs which pop out of the Systray                                                                Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command                                   GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI                                      NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure      Notify - Small notifications on the edge of the display
Date_Time_Convert - Easily convert date/time formats, including the language               GUIListViewEx - Insert, delete, move, drag, sort and edit ListView items

#91 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,238 posts

Posted 16 December 2011 - 12:32 PM

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()
AutoIt         
; #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, 16 December 2011 - 12:35 PM.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 30/07/2014


#92 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 21,262 posts

Posted 16 December 2011 - 02:13 PM

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
StringSize - Automatically size controls to fit text                                                               ExtMsgBox - A user customisable replacement for MsgBox
Toast - Small GUIs which pop out of the Systray                                                                Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command                                   GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI                                      NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure      Notify - Small notifications on the edge of the display
Date_Time_Convert - Easily convert date/time formats, including the language               GUIListViewEx - Insert, delete, move, drag, sort and edit ListView items

#93 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,238 posts

Posted 16 December 2011 - 02:39 PM

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, 16 December 2011 - 02:41 PM.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 30/07/2014


#94 MilesAhead

MilesAhead

    Eclectician

  • Active Members
  • PipPipPipPipPipPip
  • 607 posts

Posted 17 December 2011 - 09:05 PM

Thanks for Toast. Makes a nice delayed start splash. :)

Attached Thumbnails

  • toastshot.jpg

Edited by MilesAhead, 17 December 2011 - 09:18 PM.

"I don't want to belong to any club that would have me as a member."- Groucho Marx

#95 MilesAhead

MilesAhead

    Eclectician

  • Active Members
  • PipPipPipPipPipPip
  • 607 posts

Posted 18 December 2011 - 07:45 AM

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.

Attached Thumbnails

  • toastshot.jpg

"I don't want to belong to any club that would have me as a member."- Groucho Marx

#96 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 21,262 posts

Posted 18 December 2011 - 09:48 AM

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
StringSize - Automatically size controls to fit text                                                               ExtMsgBox - A user customisable replacement for MsgBox
Toast - Small GUIs which pop out of the Systray                                                                Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command                                   GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI                                      NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure      Notify - Small notifications on the edge of the display
Date_Time_Convert - Easily convert date/time formats, including the language               GUIListViewEx - Insert, delete, move, drag, sort and edit ListView items

#97 MilesAhead

MilesAhead

    Eclectician

  • Active Members
  • PipPipPipPipPipPip
  • 607 posts

Posted 18 December 2011 - 08:17 PM

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

"I don't want to belong to any club that would have me as a member."- Groucho Marx

#98 jmon

jmon

    Adventurer

  • Active Members
  • PipPip
  • 108 posts

Posted 19 December 2011 - 02:31 PM

. Thanks for finding the bug. :)

Glad to help, your udf is so nice. I still didn't have time to look into it, but hopefully tomorrow I will. Thanks.

#99 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 21,262 posts

Posted 19 December 2011 - 03:05 PM

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
StringSize - Automatically size controls to fit text                                                               ExtMsgBox - A user customisable replacement for MsgBox
Toast - Small GUIs which pop out of the Systray                                                                Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command                                   GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI                                      NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure      Notify - Small notifications on the edge of the display
Date_Time_Convert - Easily convert date/time formats, including the language               GUIListViewEx - Insert, delete, move, drag, sort and edit ListView items

#100 MilesAhead

MilesAhead

    Eclectician

  • Active Members
  • PipPipPipPipPipPip
  • 607 posts

Posted 20 December 2011 - 09:09 PM

You may be aware of it already, but I should note that the system ignores the Desktop Work Area setting if Taskbar AutoHide is enabled. For that reason I never enable AH for Taskbar.
"I don't want to belong to any club that would have me as a member."- Groucho Marx




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users