Jump to content



Photo

Tray Tooltip


  • Please log in to reply
4 replies to this topic

#1 trids

trids

    Hmmm .. and what have we here?

  • Active Members
  • PipPipPipPipPipPip
  • 1,004 posts

Posted 20 March 2004 - 07:10 PM

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







#2 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 20 March 2004 - 07:13 PM

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.

#3 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 20 March 2004 - 07:17 PM

Ehhh, maybe not, I don't see the window in Spy++ anywhere.

#4 Jos

Jos

    oh joy ...

  • Developers
  • 21,071 posts

Posted 20 March 2004 - 07:37 PM

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);

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)


#5 trids

trids

    Hmmm .. and what have we here?

  • Active Members
  • PipPipPipPipPipPip
  • 1,004 posts

Posted 20 March 2004 - 07:46 PM

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:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users