Jump to content
Sign in to follow this  
PoojaKrishna

Hidden Tray Icon Text

Recommended Posts

PoojaKrishna

Hi friends,

 

Is there any way to get the text of hidden items in a system tray and to click on the hidden icon?

 

The following code gets text of all visible items but I want to get the text of the hidden icons too.

 

Please help. 

 

Pooja.

#include <GuiToolBar.au3>
 
$hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]')
If @error Then
Msgbox(0, "Error", "Couldn't get the Tray handle")
Exit
EndIf
; Get systray item count
Local $iSystray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray_Handle) ;get button count
If $iSystray_ButCount = 0 Then
Msgbox(0, "Error", "No tray icons")
Exit
EndIf    ; Look for wanted tooltip
$sTrayicons = $iSystray_ButCount & " Tray Icons are: " & @CRLF
For $iSystray_ButtonNumber = 0 To $iSystray_ButCount - 1 
$sTrayicons = $sTrayicons & _GUICtrlToolbar_GetButtonText($hSysTray_Handle, $iSystray_ButtonNumber) & @CRLF
Next
 
Msgbox(0, "Tray icons", $sTrayicons)
Edited by Melba23
Added code tags

Share this post


Link to post
Share on other sites
Melba23

PoojaKrishna,

You can always get the hideen icons to display as I show here. :)

M23

P.S. When you post code please use Code tags - see here how to do it. Then you get a scrolling box and syntax colouring as you can see above now I have added the tags. ;)


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
PoojaKrishna

Hi,

Thanks M23 but it does not work on my machine for hidden icons. Actually I'm trying to click on the TeamViewer icon on my machine. It works fine if the icon is active on the tray bar. Mine is a Win 7 machine.

It returns the following message for hidden icon.

---------------------------

Error
---------------------------
Icon not found in system tray
---------------------------
OK   
---------------------------
Edited by PoojaKrishna

Share this post


Link to post
Share on other sites
Melba23

PoojaKrishna,

Have you checked the CLASS/INSTANCE values for the "show hidden icons" button as suggested in the post to which I linked? If they are not the same on Win7 then it is not surprising that the code does not work. ;)

Use the AutoIt Window Info tool and see what you get as a return. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
PoojaKrishna

Yes, they are the same as in your code. Plesae see the following information i have copied from the Info tool.

>>>> Window <<<<
Title:
Class: Shell_TrayWnd
Position: 0, 734
Size: 1024, 34
Style: 0x96000000
ExStyle: 0x00000088
Handle: 0x0000000000010068
 
>>>> Control <<<<
Class: Button
Instance: 1
ClassnameNN: Button1
Name:
Advanced (Class): [CLASS:Button; INSTANCE:1]

Share this post


Link to post
Share on other sites
Melba23

PoojaKrishna,

Do the hidden icons display when you ControlClick on the button? :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
PoojaKrishna

Yes, it clicks on the button but do not read the icons.

Share this post


Link to post
Share on other sites
PoojaKrishna

Please see the code added below. Edited for TeamViewer. It clicks on the show button but couldn't get the TeamViewer icon.

#include <GuiToolBar.au3>
Global $hSysTray_Handle

_Show()

Func _Show()
    
    $hTaskBarHandle = WinGetHandle("[Class:Shell_TrayWnd]", "")
    ControlClick($hTaskBarHandle, "", "[CLASS:Button; INSTANCE:1]")
    sleep(1000)
    
    $iSysTray_ButtonNumber = _Get_Systray_Index("TeamViewer") ; Put your traytip text here as before <<<<<<<<<<<<<<<<<<<<<<
    If @error Then
        MsgBox(16, "Error", "Icon not found in system tray")
        Exit
    EndIf
    ; Action icon <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    _GUICtrlToolbar_ClickButton($hSysTray_Handle, $iSysTray_ButtonNumber, "right")


EndFunc   ;==>_Show

Func _Get_Systray_Index($sText)

    ; Find systray handle
    $hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]')
    If @error Then
        MsgBox(16, "Error", "System tray not found")
        Exit
    EndIf

    ; Get systray item count
    Local $iSysTray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray_Handle)
    If $iSysTray_ButCount = 0 Then
        MsgBox(16, "Error", "No items found in system tray")
        Exit
    EndIf

    ; Look for  tooltip
    For $iSysTray_ButtonNumber = 0 To $iSysTray_ButCount - 1
        If StringInStr(_GUICtrlToolbar_GetButtonText($hSysTray_Handle, $iSysTray_ButtonNumber), $sText) > 0 Then ExitLoop
    Next

    If $iSysTray_ButtonNumber = $iSysTray_ButCount Then
        Return SetError(1, 0, -1) ; Not found
    Else
        Return $iSysTray_ButtonNumber ; Found
    EndIf

EndFunc   ;==>Get_SysTray_Index

Share this post


Link to post
Share on other sites
Melba23

PoojaKrishna,

You do not get the text of any of the icons? :huh:

Do you at least get the icon count returned? :huh:

M23

Edited by Melba23
Added question

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
PoojaKrishna

Yes, now too I get only the number and text of the icons they are shown direct on the tray than the hidden list.

vdo6mc.png

Edited by PoojaKrishna

Share this post


Link to post
Share on other sites
Melba23

PoojaKrishna,

So the hidden icons are in a pop up window and not in the systray - hardly surprising that they do not get recognised by the code. ;)

Let us see if we can recognise the pop up:

#include <WinAPI.au3>

$hTaskBarHandle = WinGetHandle("[Class:Shell_TrayWnd]", "")
ControlClick($hTaskBarHandle, "", "[CLASS:Button; INSTANCE:1]")

; You may need to adjust this
Sleep(1000)

; Run this once the popup has appeared
$aPopUp_List = _WinAPI_EnumWindowsPopup()
If IsArray($aPopUp_List Then
    _ArrayDisplay($aPopUp_List, "Pop up list")
Else
    MsgBox(16, "Error", "Non-standard Pop-up")
EndIf
What do you get in the array (if indeed you get one)? :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
johnmcloud

Melba, starting from this i'm sure you can find a better way:

; johnmcloud - 2014
#include <GuiToolBar.au3>

Global $vIsHidden

$vIsHidden = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer", "EnableAutoTray")
If $vIsHidden == 1 Then
    Run("rundll32.exe shell32.dll Options_RunDLL 5")
    WinWait("[CLASS:CabinetWClass]", "")
    ControlClick("[CLASS:CabinetWClass]", "", "[CLASS:Button; INSTANCE:3]")
    ControlClick("[CLASS:CabinetWClass]", "", "[CLASS:Button; INSTANCE:1]")
EndIf

$hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]')
If @error Then
    MsgBox(0, "Error", "Couldn't get the Tray handle")
    Exit
EndIf

Local $iSystray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray_Handle) ;get button count
If $iSystray_ButCount = 0 Then
    MsgBox(0, "Error", "No tray icons")
    Exit
EndIf

MsgBox(0, "Tray icons", $iSystray_ButCount)

If $vIsHidden == 1 Then
    Run("rundll32.exe shell32.dll Options_RunDLL 5")
    WinWait("[CLASS:CabinetWClass]", "")
    ControlClick("[CLASS:CabinetWClass]", "", "[CLASS:Button; INSTANCE:3]")
    ControlClick("[CLASS:CabinetWClass]", "", "[CLASS:Button; INSTANCE:1]")
EndIf

The EnableAutoTray show-hide all icon in the traybar, the problem is i don't have found any way to refresh Explorer without closing it, envupdate, some _SendMessage etc. but nothing work so i have used the ControlClick way in the GUI

Edited by johnmcloud

Share this post


Link to post
Share on other sites
PoojaKrishna

Hi Melba,

Sorry, it couldn't find any popup windows. The following code returns the count as 0. An edited version of your code.

#include <WinAPI.au3>
#include<Array.au3>

$hTaskBarHandle = WinGetHandle("[Class:Shell_TrayWnd]", "")
ControlClick($hTaskBarHandle, "", "[CLASS:Button; INSTANCE:1]")

; You may need to adjust this
Sleep(5000)

; Run this once the popup has appeared
$aWindows = _WinAPI_EnumWindowsPopup()
msgbox(0,"", $aWindows[0][0])
    For $i = 1 To $aWindows[0][0]
        $text = "Window Handle: " & $aWindows[$i][0] & @LF
        $text &= "Window Class: " & $aWindows[$i][1] & @LF
        $text &= "Window Title: " & WinGetTitle($aWindows[$i][0]) & @LF
        $text &= "Window Text: " & WinGetText($aWindows[$i][0]) & @LF
        $text &= "Window Process: " & WinGetProcess($aWindows[$i][0])
        MsgBox(0, "Item " & $i & " of " & $aWindows[0][0], $text)
    Next

Yes John I was also planning something like you have posted but I too see no way to refresh the tray after a reg edit.

Edited by PoojaKrishna

Share this post


Link to post
Share on other sites
johnmcloud

PoojaKrishna,

My script work because don't write directly in the registry but use the "window" version, did you try it? If there is a way to refresh the tray after the regedit you can only use that way

Edited by johnmcloud

Share this post


Link to post
Share on other sites
PoojaKrishna

John,

Your script is working on my machine with some small changes. Thank you so much for your help. I'm planning to add your way until I get a direct way to refresh the tray.

; johnmcloud - 2014
#include <GuiToolBar.au3>
#RequireAdmin
Global $vIsHidden

$vIsHidden = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer", "EnableAutoTray")
If $vIsHidden == 1 Then
    Run("rundll32.exe shell32.dll Options_RunDLL 5")
    WinWait("Notification Area Icons", "")
sleep(500)
    ControlClick("Notification Area Icons", "", "[CLASS:Button; INSTANCE:3]")
sleep(500)

    ControlClick("Notification Area Icons", "", "[CLASS:Button; INSTANCE:1]")
sleep(500)

EndIf

$hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]')
If @error Then
    MsgBox(0, "Error", "Couldn't get the Tray handle")
    Exit
EndIf

Local $iSystray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray_Handle) ;get button count
If $iSystray_ButCount = 0 Then
    MsgBox(0, "Error", "No tray icons")
    Exit
EndIf

MsgBox(0, "Tray icons", $iSystray_ButCount)

If $vIsHidden == 1 Then
    Run("rundll32.exe shell32.dll Options_RunDLL 5")
    WinWait("Notification Area Icons", "")
sleep(500)
    ControlClick("Notification Area Icons", "", "[CLASS:Button; INSTANCE:3]")
sleep(500)

    ControlClick("Notification Area Icons", "", "[CLASS:Button; INSTANCE:1]")
sleep(500)
EndIf
Edited by PoojaKrishna

Share this post


Link to post
Share on other sites
PoojaKrishna

Hi friends,

We can close the explorer after the reg edits and it will auto start again with the new changes. Please see the following code. Working for me.

#requireadmin
Global $vIsHidden ;Reg value of show all tray icons
Global $sKey
 If @OSArch = "X64" Then
    sKey = "HKEY_CURRENT_USER64\Software\Microsoft\Windows\CurrentVersion\Explorer"
Else
   $sKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer"
EndIf
$vIsHidden = RegRead($sKey, "EnableAutoTray")
If @error Then
   Msgbox(0,"Error", "Couldn't read the regkey with error: " & @error)
   Exit
EndIf

Msgbox(0,"EnableAutoTray","Value at Reg: " & $vIsHidden)
If $vIsHidden = 1 Then ;If tray has hidden icons
   RegWrite ($sKey , "EnableAutoTray", "REG_DWORD", "0" )
   If @error Then
   Msgbox(0,"Error", "Couldn't write the regkey with error: " & @error)
   Exit
EndIf
   sleep(1000)
   $PID = ProcessExists("explorer.exe") ; Will return the PID or 0 if the process isn't found.
   If $PID Then ProcessClose($PID)
      sleep(1000)
EndIf

Share this post


Link to post
Share on other sites
johnmcloud

PoojaKrishna:

The EnableAutoTray show-hide all icon in the traybar, the problem is i don't have found any way to refresh Explorer without closing it, envupdate, some _SendMessage etc. but nothing work so i have used the ControlClick way in the GUI

 

 

Close-reopen Explorer.exe is obvious that works ;)

Share this post


Link to post
Share on other sites
PoojaKrishna

John,

Sorry I have not noticed that you are looking for refresh without closing the explorer. 

Share this post


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
Sign in to follow this  

  • Similar Content

    • Miliardsto
      By Miliardsto
      Hello. How to make GUI restore from tray with slower speed or effect?
    • MattHiggs
      By MattHiggs
      Like stated above, I have never really attempted to create tray icon menus simply due to the fact I find them annoying (if I want to minimize a program, I will click "minimize", but if I want to close it, I don't want it to minimize to task bar and require me to close it there), but thought I should try incorporating them into latest script to at least say that I can use them.  However, I am running into a couple of snags/facts I would like to verify.  1) Since tray icons come with their own "GetMsg" function, I just want to verify that, while the continual paging of the tray menu item would still occur within some kind of loop, can the tray menu item events be declared outside and separate from the GUI events?  eg.
      While 1 $tmsg = TrayGetMsg () $nMsg = GUIGetMsg(1) Switch $tmsg Case $TrayMenu Case $settings1 If TrayItemGetState ( $settings1 ) = 65 Then IniWrite ( $path & "\infostore.ini", "Tray Settings", "No Notifications", "$TRAY_CHECKED" ) ElseIf TrayItemGetState ( $settings1 ) = 68 Then IniWrite ( $path & "\infostore.ini", "Tray Settings", "No Notifications", "$TRAY_UNCHECKED" ) Else EndIf Case $settings2 If TrayItemGetState ( $settings2 ) = 65 Then IniWrite ( $path & "\infostore.ini", "Tray Settings", "On top", "$TRAY_CHECKED" ) GUISetStyle ( BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP), $WS_EX_TOPMOST, $Form1_1 ) GUISetStyle ( BitOR($GUI_SS_DEFAULT_GUI, $DS_SETFOREGROUND), $WS_EX_TOPMOST, $Form2 ) GUISetStyle ( -1, $WS_EX_TOPMOST, $Form3 ) GUISetStyle ( BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP), BitOR($WS_EX_OVERLAPPEDWINDOW, $WS_EX_WINDOWEDGE, $WS_EX_TOPMOST), $Form3_1 ) GUISetStyle ( -1, $WS_EX_TOPMOST, $Form4 ) GUISetStyle ( -1, $WS_EX_TOPMOST, $Form5 ) ElseIf TrayItemGetState ( $settings2 ) = 68 Then IniWrite ( $path & "\infostore.ini", "Tray Settings", "On top", "$TRAY_UNCHECKED" ) GUISetStyle ( BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP), 0, $Form1_1 ) GUISetStyle ( $GUI_SS_DEFAULT_GUI, 0, $Form2 ) GUISetStyle ( $GUI_SS_DEFAULT_GUI, 0, $Form3 ) GUISetStyle ( BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP), BitOR($WS_EX_OVERLAPPEDWINDOW, $WS_EX_WINDOWEDGE), $Form3_1 ) GUISetStyle ( $GUI_SS_DEFAULT_GUI, 0, $Form4 ) GUISetStyle ( $GUI_SS_DEFAULT_GUI, 0, $Form5 ) Else EndIf EndSwitch Switch $nMsg[1] Case $Form1_1 Switch $nMsg[0] Case $GUI_EVENT_CLOSE ;ProcessClose ( "pastebutt.exe" ) ;ProcessClose ( "PasteButtonhk.exe" ) Exit EndSwitch EndSwitch Wend My second question also involves the above code, but specifically the "Ini" functions which attempt to read a "tray" state flag from an Ini file.  The following is code located at very beginning of script:
      Const $path = @AppDataDir & "\filler" Opt ( "TrayMenuMode", 1 ) OnAutoItExitRegister ( "refresh" ) $nonote = False $TrayMenu = TrayCreateMenu ( "Settings" ) $settings1 = TrayCreateItem ( "Turn off notifications", $TrayMenu ) TrayItemSetState ( -1, IniRead ( $path & "\infostore.ini", "Tray Settings", "No Notifications", "$TRAY_UNCHECKED" ) ) $settings2 = TrayCreateItem ( "Keep Window on top", $TrayMenu ) TrayItemSetState ( -1, IniRead ( $path & "\infostore.ini", "Tray Settings", "On top", "$TRAY_UNCHECKED" ) ) So the idea is that whenever the user "checks" one of the tray icon menu options, its current "state" will be input into the "ini" file, so that the state of the particular tray menu item will be in the same state as the user left it when the script is launched next.  However, this is not occurring: the ini file contains the "state" flag like it should, but the tray menu item remains unchecked at startup.  Furthermore, the checking or unchecking of "setting1" is not being recognized, as the windows' extended styles do not obtain the "Topmost" flag like they should had it worked.  I get the feeling I'm not getting the "states" of the tray menu items correct.  Any advice?

    • jvds
      By jvds
      is it possible to create a 16x16 gui and use it instead of the tray icon?
      I have seen http://www.desksoft.com/BWMeter.htm does this, it aloes you you place one of the bandwidth graphics in the tray menu instead of its own icon, I don't know if they have a little gui or use a fancy way to draw an icon in real time but it would be nice to have an interactive icon, or a mini gui like icon you can to things with
      any idea how it is done?
       
       
    • kcvinu
      By kcvinu
      Hi all,
      I have searched this forum and found a function named "Get_Systray_Index()" written by Melba23. It is working very good. It can right click on my particular tray icon. But how can select a particular menu item from it. See the attached image. I have tried Send("K") and Send("k") and Send("{DOWN}{ENTER}"). But none of them is working. I don't want to use a mouseclick function. Because i need to use the same script in my laptop too. So please help. Thanks in advance.

×