Jump to content

Windows 10 Traytips


pau31
 Share

Recommended Posts

Hello everyone,

I've just upgraded my SO to Windows 10 and I've noticed that the function TrayTip() generates this different type of message:

Captura.thumb.PNG.4a3884259d957eebed31ed

The problem is that one traytip command does not immediately dismiss the previous one, so it takes forever. I've also tried this: 

To clear a balloon tip that is being displayed, call another tip with an empty text string (and any title).

TrayTip("", "A different tray tip.", 5)

But it doesn't work :/

Anyone has been throught this problem? Or can you recommend me an alternative way to inform the user about the status of a script?

Thank you very much!

Link to comment
Share on other sites

  • 3 months later...

Hi, i know it's been a while, but im very interested in the solution for this, because i have the same problem.

Here's what i tried so far without success:
 

TrayTip('test', 'testing', 5, 1)
Sleep(1000)
ConsoleWrite('Lets do this - '&@MSEC&@CRLF)
WinClose('[CLASS:Windows.UI.Core.CoreWindow]')
WinKill("[CLASS:Windows.UI.Core.CoreWindow]")
WinClose('New notification')
WinKill('New notification')
TrayTip('', '', 0)
ConsoleWrite('Killed? - '&@MSEC&@CRLF)
Sleep(7000)

Info tool outputs those 2 fields, but they dont work with these functions.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

You could try creating your own UDF for TrayTip using the MSDN reference. Good luck with that, it doesn't look to fun. Could also try ControlClick? Make your own UDF for TrayTip (Like _TrayTipWin10) that will check to see if a notification is currently present, close it, then call TrayTip.

You could also use ToolTip instead or create a GUI with an edit box in it that you can append to or a label that you can overwrite with debugging info

Link to comment
Share on other sites

Yes, doesn't look fun, and i don't have enough knowlegde to do it. On a side note WinWaitActive also doesn't detect it, controlclick won't detect the place to click, so it has to be made from scratch, its something new to autoit.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

This page in msdn has code on hiding the toasts, what can i do with it? I got a general idea on the dll calls and such, but not a pro on it.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

You'd have to create your own toast notification UDF that's going to do some DLL calls. I know C++ pretty well but I don't know enough about dll calls to create a class, set values, and call the toast display/hide functions.

Melba made some toast notification example that might help if you don't want to use windows toast

And it looks like someone suggested disabling the tray icon for the script and then re-enable it (Since notifications will not be displayed if there's no tray icon).

This works on windows 7, you might want to use a timer instead of just sleep

_TrayTip("Title 1", "First test notification", 5)

_TrayTip("Title 2", "Second test notification", 2)

Func _TrayTip(Const ByRef $sTitle, Const ByRef $sMsg, Const ByRef $iTimeout, Const $iOption = 0)
    Local $hwnd_timer

    TrayTip($sTitle, $sMsg, $iTimeout, $iOption)

    $hwnd_timer = TimerInit()
    While (($iTimeout * 1000) - TimerDiff($hwnd_timer) > 0)
        Sleep(10)
    WEnd

    Opt("trayiconhide", 1);Momentarily hides AutoIt Tray Icon as TrayTip cannot function without a tray icon.
    Opt("trayiconhide", 0);Re-enables AutoIt Tray Icon.
EndFunc

You could Adlibregister/deregister to check a global timer instead of keeping the script stuck in the _TrayTip function

Link to comment
Share on other sites

I've used melba's toasts in the past, i'll probably use 'em again, now, in terms of disabling the toasts and stuff, you have the option for it, by opening the action center and clicking the notification, to "disable all notifications for this application" or whatever. I just wanted to be able to delete a previous toast to update the information faster, as of now it doesn't and each toast has a long timeout, i did discover that killing "shellexperiencehost.exe" the toast goes away, the problem is that whenever another one is called, the one that comes up was the last one "killed", not the new one.

ProcessExplorer shows this exe, it's kinda hidden.

Untitled.png

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

Hi, im not sure you got the issue, but i'll try to explain again, using traytips in autoit outputs these windows notifications that, take forever to go away, and don't update fast as say, a tooltip, you can output like 3 traytips in 3 seconds, 1 per second, but the time for windows to show you the actual/last traytip is going to be like 10 seconds, can't precise, but seems forever, and the notifications pile up in action center.. Basically it doesn't work as in windows 7, just try it and see.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

Maybe using a different means to communicate information to the user? Check if your use of TrayTip follows these guidelines:

 

See the Notifications and Notification Area sections of the Windows User Experience Interaction Guidelines for best practices in the use of notifications and the notification area. The goal is to provide user benefit through appropriate use of notifications, without being annoying or distracting.

The notification area is not for critical information that must be acted on immediately. It is also not intended for quick program or command access. As of Windows 7, much of that functionality is best accomplished through an application's taskbar button.

Windows 7 allows a user to suppress all notifications from an application if they choose, so thoughtful notification design and use will incline the user to allow your application to continue to display them. Notifications are an interruption; ensure that they are worth it.

Windows 7 introduces the concept of "quiet time". Quiet time is defined as the first hour after a new user logs into his or her account either for the first time or for the first time after an operating system upgrade or clean installation. This time is set aside to allow the user to explore and familiarize themselves with the new environment without the distraction of notifications. During this time, most notifications should not be sent or shown. Exceptions include feedback that the user would expect to see in response to a user action, such as when he or she plugs in a USB device or prints a document. API specifics of regarding quiet time are discussed later in this topic.

If not, I'd suggest using a MsgBox or similar. 

Edited by hydranix
Link to comment
Share on other sites

I created a kind of toast, similar to the windows one, but this one can be called many times, and will override the previous one.

 

 

Capture.PNG

Edited by careca
Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

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

×
×
  • Create New...