Jump to content

Tray Tooltip


 Share

Recommended Posts

The ToolTip and TrayTip functions are really cool :lmao: .. but does anyone have any idea how to set the tooltip of a tray icon? :angry:

I'm talking about the tooltip that appears when you hover over the Autoit icon in the system tray. When you run a compiled script, the tooltip reflects the name of the EXE. So I thought I would try things like WinSetTitle on it, but :evil: ... :whistle: .

See, I have a script that I launch multiple times: each time with a different INI file, and I'd like append the name of the INI file to the tooltip of the tray icon that is processing it, so that I can tell them apart. Eg: MyScript.exe - group1.ini, and MyScript.exe - group2.ini .. etc

I can do workarounds like periodically running a TrayTip call .. but that's messy in so many ways; and I have a feeling I'm missing something really obvious - any ideas? B)

TIA

Link to comment
Share on other sites

The tooltip is just a window which has the title of whatever text it will display. It should be possible to get the handle to it (May have to search child windows, too). Once you have the handle, yout should be able to change the title to change the text. This is all theoretical, I've never tested.

Link to comment
Share on other sites

  • Developers

The systemtray icon is set with the Shell_NotifyIcon call to Lib "shell32".

nic.cbSize= sizeof(NOTIFYICONDATA);
nic.hWnd= hWnd;
nic.uID= AUT_NOTIFY_ICON_ID;
nic.uFlags= NIF_ICON | NIF_MESSAGE;
nic.uCallbackMessage    = AUT_WM_NOTIFYICON;
nic.hIcon= LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_MAIN_32x32x16));
Shell_NotifyIcon(NIM_ADD, &nic);

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 comment
Share on other sites

Thanks for the quick reply, folks .. I'm almost glad to see I didn't miss anything B)

The systemtray icon is set with the Shell_NotifyIcon call to Lib "shell32".

So does this mean a new built-in intrinsic function? .. :whistle:
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...