[LIB] TrayIcon - Sean's TrayIcon for Unicode and 64 bit

Post your working scripts, libraries and tools
Vince42
Posts: 6
Joined: 05 Feb 2016, 14:41

Re: [LIB] TrayIcon - Sean's TrayIcon for Unicode and 64 bit

21 Nov 2017, 15:17

RiseUp wrote:If it appears in Task Manager as java.exe, then surely that could be the issue. Also, the uncommented call to the library function in your code simulates a single-click with the left mouse button. Is that what you're trying for?

Using TrayIcon_GetInfo() would definitely help to debug your issue, but it isn't necessary to get it working once you have the right parameter(s) figured out for TrayIcon_Button().


I already unsuccessfully tried "java.exe" als Parameter - obviously something is missing or they changed something in Windwos 10 again.

Yes, a single click with the left mouse button is exactly what I need.

Do you have a sample code to iterate over the icons in the TrayIcon?
RiseUp
Posts: 26
Joined: 01 Oct 2013, 21:27

Re: [LIB] TrayIcon - Sean's TrayIcon for Unicode and 64 bit

21 Nov 2017, 16:13

Vince42 wrote:I already unsuccessfully tried "java.exe" als Parameter - obviously something is missing or they changed something in Windwos 10 again.

Yes, a single click with the left mouse button is exactly what I need.

Do you have a sample code to iterate over the icons in the TrayIcon?

Sure, try the following code. It should bring up a ListView with all of your system tray icons' process names, tooltips, and handles.

Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus


This works for me on Windows 10. Let me know if it works for you.
Vince42
Posts: 6
Joined: 05 Feb 2016, 14:41

Re: [LIB] TrayIcon - Sean's TrayIcon for Unicode and 64 bit

23 Nov 2017, 16:11

Sorry for the late reply, I have not been notified of your reply. :(

Thank you very much for the code! I ran the script and five of twelve SysTray icons are listed - and the java one is missing amongst others. I guess that's the point, where my endeavour comes to an abrupt end?
Aenfa
Posts: 7
Joined: 15 May 2016, 18:06

Re: [LIB] TrayIcon - Sean's TrayIcon for Unicode and 64 bit

24 Nov 2017, 16:12

RiseUp wrote:
Vince42 wrote:I already unsuccessfully tried "java.exe" als Parameter - obviously something is missing or they changed something in Windwos 10 again.

Yes, a single click with the left mouse button is exactly what I need.

Do you have a sample code to iterate over the icons in the TrayIcon?

Sure, try the following code. It should bring up a ListView with all of your system tray icons' process names, tooltips, and handles.

Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus


This works for me on Windows 10. Let me know if it works for you.

I have tested it in Windows 10 and have found the library in the first post only sees visible icons while the library at post https://autohotkey.com/boards/viewtopic ... 9186#p9186 only sees hidden icons.

Using Windows 10 v 1709 build 16299.64 and AHK 1.1.26.01
Vince42
Posts: 6
Joined: 05 Feb 2016, 14:41

Re: [LIB] TrayIcon - Sean's TrayIcon for Unicode and 64 bit

24 Nov 2017, 16:38

Maybe there will be a "universal" version of TrayIcon, which would a) display visible and hidden icons and b) deliver information about the state of visibility in the future - I will try it again, as soon as I get all my SysTray icons listed.

it would also be cool, if the system icons like network connection, battery, sound, language and clock would be clickable as well.
RiseUp
Posts: 26
Joined: 01 Oct 2013, 21:27

Re: [LIB] TrayIcon - Sean's TrayIcon for Unicode and 64 bit

24 Nov 2017, 23:33

Aenfa wrote:I have tested it in Windows 10 and have found the library in the first post only sees visible icons while the library at post https://autohotkey.com/boards/viewtopic ... 9186#p9186 only sees hidden icons.

Using Windows 10 v 1709 build 16299.64 and AHK 1.1.26.01

Thank you, Aenfa, for your testing and reporting. :thumbup:

Vince42 wrote:Maybe there will be a "universal" version of TrayIcon, which would a) display visible and hidden icons and b) deliver information about the state of visibility in the future - I will try it again, as soon as I get all my SysTray icons listed.

it would also be cool, if the system icons like network connection, battery, sound, language and clock would be clickable as well.

I've made a change to the library's code and put it up on Github, but I'll post it here, too:
TrayIcon.ahk
(12.36 KiB) Downloaded 30 times

Hopefully, this should work for both the hidden and the visible tray icons. Once you have the newest TrayIcon.ahk in one of your library locations, try this code that should list all of your tray icons, both visible and hidden:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Last edited by RiseUp on 07 Dec 2017, 21:57, edited 1 time in total.
Vince42
Posts: 6
Joined: 05 Feb 2016, 14:41

Re: [LIB] TrayIcon - Sean's TrayIcon for Unicode and 64 bit

25 Nov 2017, 17:00

:bravo: OMG! What can I say! It works!!! Thank you so much!
User avatar
nnnik
Posts: 2496
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: [LIB] TrayIcon - Sean's TrayIcon for Unicode and 64 bit

12 Feb 2018, 09:24

@FanaticGuru your code tries to free hProc with VirtualFreeEx though the actual variable that should be freed is pRB - I hop you can correct this otherwise this script leaks memory.
Recommends AHK Studio

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 23 guests