Jump to content
  1. kcvinu


  • Similar Content

    • By MONaH-Rasta
      Opt('TrayAutoPause', 0) $iTray1 = TrayCreateItem('Tray 1') TrayItemSetState(-1, 1) TrayCreateItem('') $iTrayMenu1 = TrayCreateMenu('Tray Menu 1') $iTray2 = TrayCreateItem('Tray 2', $iTrayMenu1, -1, 1) TrayItemSetState(-1, 1) $iTray3 = TrayCreateItem('Tray 3', $iTrayMenu1, -1, 1) $iTray4 = TrayCreateItem('Tray 4', $iTrayMenu1, -1, 1) TrayCreateItem('') $iTrayMenu2= TrayCreateMenu('Tray Menu 2') $iTray5 = TrayCreateItem('Tray 5', $iTrayMenu2, -1, 1) TrayItemSetState(-1, 1) $iTray6 = TrayCreateItem('Tray 6', $iTrayMenu2, -1, 1) $iTray7 = TrayCreateItem('Tray 7', $iTrayMenu2, -1, 1) TrayCreateItem('') $iTray8 = TrayCreateItem('Tray 8') $iTray9 = TrayCreateItem('Tray 9') $iTray10 = TrayCreateItem('Tray 10') TrayItemSetState(-1, 1) While True Sleep(1000*5) WEnd When I click on Tray 3 / Tray 4 / Tray 6 / Tray 7 nothing happens. Only Tray 2 and Tray 5 stay checked.
      I have tried setting 
      Opt("TrayMenuMode", 8) In this case radio menuitems act like normal menuitems only looks different.
      I'm using AutoIt v3.3.14.5.
      Tested on Windows 10 LTSC 2019 (1809) x64 version: 10.0.17763 build 17763.475 and Windows Server 2008 R2.
      Tried run script x64 and x86 same result.
      Is this kind a bug or something?
    • By lonardd
      I need to open an INTEL Graphic Tool clicking on a Win7 Tray Icon. This icon is not shown on the Win7 Tray but it is shown once you click on a button that shows a little  arrow-up. This button opens up an extension of the tray and there is my INTEL Graphic Tool Icon. 
      The first ControlClick('[Class:Shell_TrayWnd]', '', 1502 ) at line 26 of my source code (Rotatedisplays.au3) works fine as it clicks on the up-arrow shown on the uparrowfirst Menu.jpg  picture and opens up an extension of the tray. Then I'm trying to click on the INTEL Graphic Tool Icon which is the first blue icon (up-left) of the tray extension but I failed all my attempts. Can somebody help me out?

    • By ur
      I need to read the status of OneDrive icon running in the taskbar and update the status in a log file.
      2nd part I can complete
      But the first part, how to read the status of tray menu icon.

      I need the text above from the tray icon.
      I looked into , but not that helpful.
    • By Miliardsto
      Hello. How to make GUI restore from tray with slower speed or effect?
    • 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?

  • Create New...