Recently Browsing 0 members
No registered users viewing this page.
traytip isn't working in windows 10. nothing happens when i use the Traytip command.
here's a simple script i used:
TrayTip("I'm a title", "I'm the message", 5) i tried changing the registry setting HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced ( which didn't have EnableBalloonTips) and creating a DWORD entry called EnableBalloonTips and setting it to 1 and logging off then back in. that did not resolve the problem.
i'm running Windows 10 v1709 b16299.431
It's been a while since I've posted but here is a simple little function I thought I'd share that allows you to keep a script process active for a minimum amount of time.
I use this to ensure the process is active to ensure any TrayTips remain visible. But I'm sure there is far more interesting uses for this.
How it Works
The coder calls the KeepAlive function with the number of seconds he/she wants to ensure the process will remain active for the next n seconds. Let's say you just called the TrayTip function with 15 seconds display time. You might call KeepAlive with 18 seconds to ensure the process stays active for the next 18 seconds. If the process is closed after that, then the process will close normally.
#Region - KeepAlive Functions ;## Function used to ensure the process stays active for the next n seconds. This is useful to ensure ToolTips ect remain visible. #cs - Example TrayTip(@ScriptName, "This Tip will be called just prior to exit of process.", 5) KeepAlive(8) Exit #ce - Example Func KeepAlive($Seconds = 5) Global $KeeyAlive_IsActive = False Global $KeeyAlive_Init = 0 Global $KeeyAlive_Timeout = 0 ;## Check if there is a previously set timer and only set the new value if it is more than the previously set value. If $KeeyAlive_Timeout - TimerDiff($KeeyAlive_Init) < $Seconds * 1000 Then $KeeyAlive_Init = TimerInit() $KeeyAlive_Timeout = $Seconds * 1000 EndIf ;## If the callback is not yet regerister to execute on exit, register it now. If Not $KeeyAlive_IsActive Then $KeeyAlive_IsActive = True OnAutoItExitRegister("__KeepAlive_OnExit") EndIf EndFunc ;## Private On Exit Function used to ensure program remains active for a previously defined number of seconds. Func __KeepAlive_OnExit() ;## If closeing due to Loffoff or shutdown. Allow it without Delay. If @exitMethod > 2 Then Return ;## Check for reasons that process should be clsoed immediatly without delay. If @exitMethod > 2 Or Not IsDeclared("KeeyAlive_IsActive") Or Not IsDeclared("KeeyAlive_Init") Or Not IsDeclared("KeeyAlive_Timeout") Or TimerDiff($KeeyAlive_Init) > $KeeyAlive_Timeout Then Return ;## Pause Process for the time remaining. ConsoleWrite("Keeping Alive for " & Int($KeeyAlive_Timeout - TimerDiff($KeeyAlive_Init)) & "ms" & @CRLF) Sleep($KeeyAlive_Timeout - TimerDiff($KeeyAlive_Init)) EndFunc #EndRegion Enjoy!
#include <Date.au3> #include <TrayConstants.au3> HotKeySet("^d", "WhatIsToday") Global $Today = _Date_Time_GetSystemTime While 1 Sleep(100) WEnd Func WhatIsToday() TrayTip("Today's date", "Today is... " & $Today, 8) Sleep(8000) TrayTip("", "", 0) EndFunc ;==>WhatIsToday all it outputs into tray bubble is: Today is...
without getting the system time as text
I've just upgraded my SO to Windows 10 and I've noticed that the function TrayTip() generates this different type of message:
The problem is that one traytip command does not immediately dismiss the previous one, so it takes forever. I've also tried this:
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!
Works with ctrl+left mouse click, displays a traytip, balloon-like with the image resolution, if can be read. Not entirely mine, got help from forum, without you i couldn't have done it. thanks ppl.
#include "image_get_info.au3" #include <Misc.au3> AutoItSetOption("TrayAutoPause", 0) Local $DLL = DllOpen("user32.dll") Local $file, $aInfo, $keyR1, $keyR2 RegWrite("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced", "EnableBalloonTips", "REG_DWORD", "1") While 1 Sleep(50) If _IsPressed("11", $dll) Then ;CTRL $keyR1 = 1 CTRLkey() ElseIf $keyR1 + $keyR2 = 2 Then RES() EndIf WEnd DllClose($dll) Func CTRLkey() If _IsPressed("01", $dll) Then ;LMB $keyR2 = 1 EndIf EndFunc ;==>CTRLkey Func RES() $keyR1 = 0 $keyR2 = 0 Send("^c") Sleep(50) $file = ClipGet() $aInfo = _ImageGetInfo($file) TrayTip("Resolution", _ImageGetParam($aInfo, "Width") & "x" & _ImageGetParam($aInfo, "Height"), 2, 1) EndFunc ;==>RES
EDIT: Required UDF attached, had to change code as it wasn't working flawlessly as it should, now it's good, press ctrl and click on the image, once you release ctrl, the traytip will show the resolution of the image. Got to investigate why it wasn't working well the other way.