Jump to content

File Description Remove in Tray Tip Balloon?


Recommended Posts

I would like the text to appear under the message only if I add a description and have it totally blank if there isn't one, whether there is an icon used or not for the TrayTip.

If this is a feature request then having the option to choose what to display on the second line within code versus hardwired via compile directives would be better.

Link to post
Share on other sites
  • Replies 43
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

For further information I am pasting most of the directives at the beginning of my program. 


#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_UseX64=Y
    #AutoIt3Wrapper_ShowProgress=Y
    #AutoIt3Wrapper_Outfile=testTool.exe
    #AutoIt3Wrapper_Outfile_x64=testTool.exe
    #AutoIt3Wrapper_Compression=3
    #AutoIt3Wrapper_Res_Description=
    #AutoIt3Wrapper_Res_Fileversion=2.0.5.40
    #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
    #AutoIt3Wrapper_Res_Language=1033
    #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
    #AutoIt3Wrapper_Res_Field=productname|Testing Tool x64
    #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#Region ; Includes
    #include <Constants.au3>
    #include <GUIConstantsEx.au3>
    #include <Misc.au3>
    #include <String.au3>
    #include <Array.au3>
    #include <controlServices.au3>
    #include <File.au3>
    #include <Timers.au3>
    #include <MsgBoxConstants.au3>
    #include <TrayConstants.au3>
    #include <WinAPIFiles.au3>
#EndRegion


To compile I press the F7 key in Scite so whatever that is that does the compiling. 

Link to post
Share on other sites
  • Developers
12 hours ago, iAmNewbe said:

TrayTip("","TEXT MESSAGE",0,0)   = will all always have text under the message whether description is filled in or not

I don't see that with the quoted statement, but do see it with TrayTip("","TEXT MESSAGE",0,1)

This is more or less how it is currently working inside of AutoIt3 using the standard windows call:

#AutoIt3Wrapper_Res_Description=Desciption

#include <APIShellExConstants.au3>
#include <WinAPIShellEx.au3>

TrayTip('', 'text', 0, 0)
Sleep(2000)
TrayTip('', 'text', 0, 1)
Sleep(2000)
TrayTip('', 'text', 0, 2)
Sleep(2000)
;~ Exit

_TrayTipEx('', 'text', 0, 0)
Sleep(2000)
_TrayTipEx('', 'text', 0, 1)
Sleep(2000)
_TrayTipEx('', 'text', 0, 2)
Sleep(2000)

Func _TrayTipEx($title, $text, $timeout, $option = 0)
    Local $tNOTIFYICONDATA = DllStructCreate($tagNOTIFYICONDATA)
    DllStructSetData($tNOTIFYICONDATA, 'Size', DllStructGetSize($tNOTIFYICONDATA))
    DllStructSetData($tNOTIFYICONDATA, 'Flags', $NIF_INFO)
    DllStructSetData($tNOTIFYICONDATA, 'hWnd', WinGetHandle(AutoItWinGetTitle()))
    DllStructSetData($tNOTIFYICONDATA, 'ID', 1)
    DllStructSetData($tNOTIFYICONDATA, 'InfoTitle', $title)
    DllStructSetData($tNOTIFYICONDATA, 'Info', $text)
    DllStructSetData($tNOTIFYICONDATA, 'Version', $timeout*1000)
    DllStructSetData($tNOTIFYICONDATA, 'InfoFlags', $option)
    DllStructSetData($tNOTIFYICONDATA, 'ID', 2)
    $rc = _WinAPI_ShellNotifyIcon($NIM_ADD, $tNOTIFYICONDATA)
    ; Update when failing due to already existing 
    If not $rc then _WinAPI_ShellNotifyIcon($NIM_MODIFY, $tNOTIFYICONDATA)
EndFunc   ;==>

Maybe you can use that to change it to how you want it to work.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

i must be running an outdated instance of Windows 10, 'cause i don't see the file description (as in your screenshot) either way. two suggestions i'd consider trying:

1) what happens if you add a title, as in the first parameter of TrayTip() ?

2) what if you have a text that spans two lines (or more)?

Link to post
Share on other sites
1 hour ago, orbs said:

i must be running an outdated instance of Windows 10, 'cause i don't see the file description (as in your screenshot) either way. two suggestions i'd consider trying:

1) what happens if you add a title, as in the first parameter of TrayTip() ?

2) what if you have a text that spans two lines (or more)?


I don't want a title on my notifications.

For number 2 it is same, there is ALWAYS text under the message when an icon is used it does not matter what icon.

Link to post
Share on other sites

Jos there is a problem

Just using the function code you provided the word "desciption" is always shown under the message. Where is this word located at?  It is not in the code below.

 

#AutoIt3Wrapper_Res_Description=

#include <APIShellExConstants.au3>
#include <WinAPIShellEx.au3>

_TrayTipEx('', 'text', 0, 0)
Sleep(2000)
_TrayTipEx('', 'text', 0, 1)
Sleep(2000)
_TrayTipEx('', 'text', 0, 2)
Sleep(2000)

Func _TrayTipEx($title, $text, $timeout, $option = 0)
    Local $tNOTIFYICONDATA = DllStructCreate($tagNOTIFYICONDATA)
    DllStructSetData($tNOTIFYICONDATA, 'Size', DllStructGetSize($tNOTIFYICONDATA))
    DllStructSetData($tNOTIFYICONDATA, 'Flags', $NIF_INFO)
    DllStructSetData($tNOTIFYICONDATA, 'hWnd', WinGetHandle(AutoItWinGetTitle()))
    DllStructSetData($tNOTIFYICONDATA, 'ID', 1)
    DllStructSetData($tNOTIFYICONDATA, 'InfoTitle', $title)
    DllStructSetData($tNOTIFYICONDATA, 'Info', $text)
    DllStructSetData($tNOTIFYICONDATA, 'Version', $timeout*1000)
    DllStructSetData($tNOTIFYICONDATA, 'InfoFlags', $option)
    DllStructSetData($tNOTIFYICONDATA, 'ID', 2)
    $rc = _WinAPI_ShellNotifyIcon($NIM_ADD, $tNOTIFYICONDATA)
    ; Update when failing due to already existing
    If not $rc then _WinAPI_ShellNotifyIcon($NIM_MODIFY, $tNOTIFYICONDATA)
EndFunc   ;==>


Compiled with F7

Edited by iAmNewbe
Link to post
Share on other sites
  • Developers
6 minutes ago, iAmNewbe said:

Just using the function code you provided the word "desciption" is always shown under the message. Where is this word located at?  It is not in the code below.

It is in my copy of the code!

5 hours ago, Jos said:

#AutoIt3Wrapper_Res_Description=Desciption

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

Does windows cache this or something?   I did a search through all the Autoit folders and files and there is nothing found for "desciption"..      

I ran your pasted code unaltered a few times.  Only thing I can think of here is that Windows is caching the entire message somewhere and only the part that is updated like the message is changed.  Am I wrong?

Link to post
Share on other sites
4 minutes ago, Jos said:

It is in my copy of the code!

Jos

I know. but I changed it and it is still showing up.  Even when I put something else in there..  Though I am not now using the TrayTip instead the function you pasted for me to try.

Edited by iAmNewbe
typo
Link to post
Share on other sites

Changed the code and I have no idea why or where "desciption" is showing up.

 

#AutoIt3Wrapper_Res_Description=sdfsdfsfd

#include <APIShellExConstants.au3>
#include <WinAPIShellEx.au3>

TrayTip('', 'test', 0, 1)

;~ _TrayTipEx('', 'text', 0, 0)
;~ Sleep(2000)
_TrayTipEx('', 'text', 0, 1)
Sleep(2000)
_TrayTipEx('', 'text', 0, 2)
Sleep(2000)

Func _TrayTipEx($title, $text, $timeout, $option = 0)
    Local $tNOTIFYICONDATA = DllStructCreate($tagNOTIFYICONDATA)
    DllStructSetData($tNOTIFYICONDATA, 'Size', DllStructGetSize($tNOTIFYICONDATA))
    DllStructSetData($tNOTIFYICONDATA, 'Flags', $NIF_INFO)
    DllStructSetData($tNOTIFYICONDATA, 'hWnd', WinGetHandle(AutoItWinGetTitle()))
    DllStructSetData($tNOTIFYICONDATA, 'ID', 1)
    DllStructSetData($tNOTIFYICONDATA, 'InfoTitle', $title)
    DllStructSetData($tNOTIFYICONDATA, 'Info', $text)
    DllStructSetData($tNOTIFYICONDATA, 'Version', $timeout*1000)
    DllStructSetData($tNOTIFYICONDATA, 'InfoFlags', $option)
    DllStructSetData($tNOTIFYICONDATA, 'ID', 2)
    $rc = _WinAPI_ShellNotifyIcon($NIM_ADD, $tNOTIFYICONDATA)
    ; Update when failing due to already existing
    If not $rc then _WinAPI_ShellNotifyIcon($NIM_MODIFY, $tNOTIFYICONDATA)
EndFunc   ;==>

The TrayTip line shows the "sdfsdfsfd"  under the message

The _TrayTipEx lines show the "desciption" under the message

Why?  How?  I am getting frustrated now.  I don't understand why this is happening.

Edited by iAmNewbe
Link to post
Share on other sites
  • Developers

mmm.. I indeed have the same and it seems to be cached because it is gone after killing and restarting Explorer. 

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

i'm beginning to think you are battling windmills here. consider using a description that coincide with the text you display, so the end-user is not baffled or alarmed by. for example, if your text is "testing tool is running" (as in your screenshot), use a description like "BrandName testing tool" (where BrandName is your brand name, i.e. something that the end-user identifies and is aware of, so they don't get suspicious about a malware).

trying to battle Microsoft design of Windows 10 ever-changing "features" and deliberately-crippled settings is going to waste your time and energy.

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...