Adam1213 Posted October 10, 2006 Share Posted October 10, 2006 Hello, After I use _SysTrayIconRemove(_SysTrayIconIndex($st_process)) to hide a icon, there is a empty space in the left of the clock (I think there is place for another icon). But if I start another app that has a tray icon, the systray refreshes and there is no empty space. Is there a way to remove that empty space? Here is a pic to be more specific Thank you. The way to get rid of the empty space is to do something with a tray icon for example Opt("TrayIconHide", 1); hide autoit tray icon Opt("TrayIconHide", 0); show autoit tray icon IRC Client - 75 pages 3728 lines. Blob crumbler (game)Backup (drag to backup + cmd line)RS232 Link to comment Share on other sites More sharing options...
nugame Posted October 25, 2006 Share Posted October 25, 2006 * bump * Can someone with Win2000 please try if getting tooltip texts work on that? Thanks.It does not work on win 2000. Mouse cursor moves to start of tray but cannot move it. Same code works great in windows xp. Rats. Dr SherlockAlways a way Link to comment Share on other sites More sharing options...
nugame Posted October 25, 2006 Share Posted October 25, 2006 I downloaded the SysTray_UDF and integrated into automation code. After a few boo boos, it works great on Windows XP. Tired the same code on Windows 2000, the cursor moves to the start of the tray and that is it. Is there an update to this UDF? Thanks Dr SherlockAlways a way Link to comment Share on other sites More sharing options...
snaileater Posted November 8, 2006 Share Posted November 8, 2006 i was trying this UDF my turn ... very nice indeed ...i have the following question ... all is running as expected BUT when i try to hide REALVNC icon (yeah, yeah ... i know ...) with _SysTrayIconRemove the icon reappear a few seconds later ...When i use _SysTrayIconVisible(1, _SysTrayIconIndex($st_process)) the icon doesn't reappear even after completion of the script ...Am i doing anything wrong ? do u have any idea why it behaves this way ?Thanks ! Link to comment Share on other sites More sharing options...
jftuga Posted November 15, 2006 Share Posted November 15, 2006 I am trying to remove the Windows Update icon from the System Tray. It looks like a yellow shield with a black explanation point. I believe the process name is wuauclt.exe (please correct me if I am wrong about this). The code below does not remove the icon from the tray. What am I doing wrong? Thanks, -John #include "SysTray_UDF.au3" $st_process = "wuauclt.exe" _SysTrayIconRemove(_SysTrayIconIndex($st_process)) Admin_Popup, show computer info or launch shellRemote Manager, facilitates connecting to RDP / VNCProc_Watch, reprioritize cpu intensive processesUDF: _ini_to_dict, transforms ini file entries into variablesUDF: monitor_resolutions, returns resolutions of multiple monitorsReport Computer Problem, for your IT help deskProfile Fixer, fixes a 'missing' AD user profile Link to comment Share on other sites More sharing options...
Sypher Posted February 16, 2007 Share Posted February 16, 2007 If combined with GUIConstants.au3 it gives me an error: C:\PROGRA~1\AutoIt3\Include\WindowsConstants.au3(65,34) : ERROR: $WM_GETTEXT previously declared as a 'Const' Global Const $WM_GETTEXT = 0x000D Link to comment Share on other sites More sharing options...
Valhalla1 Posted September 18, 2007 Share Posted September 18, 2007 (edited) thanks for this great code, it let me clean up some nasty hacks in my scripts -edit- sorry just read this isn't support forum. i'll ask elsewhere, thanks for this helpful systray UDF Edited September 18, 2007 by Valhalla1 Link to comment Share on other sites More sharing options...
MrCreatoR Posted September 23, 2007 Share Posted September 23, 2007 Is it possible to check all icons for certain path (to some app), and if there is match, hide the icon? what i mean is, hide the icon only if it belongs to certain application exe path.. something like this:$TrayPaths = _SysTrayIconGetPaths() For $i = 0 To Ubound($TrayPaths)-1 If $TrayPaths[$i] = "c:\some app\app.exe" Then _SysTrayIconVisible(1, $i) NextIs it possible?Thanks.  Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1  AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ==================================================    AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
Nahuel Posted September 24, 2007 Share Posted September 24, 2007 If combined with GUIConstants.au3 it gives me an error:C:\PROGRA~1\AutoIt3\Include\WindowsConstants.au3(65,34) : ERROR: $WM_GETTEXT previously declared as a 'Const'Global Const $WM_GETTEXT = 0x000DSame thing happened to me. I commented it in SysTray_UDF.au3 cos I didn't need it. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 24, 2007 Moderators Share Posted September 24, 2007 If combined with GUIConstants.au3 it gives me an error:C:\PROGRA~1\AutoIt3\Include\WindowsConstants.au3(65,34) : ERROR: $WM_GETTEXT previously declared as a 'Const'Global Const $WM_GETTEXT = 0x000DSame thing happened to me. I commented it in SysTray_UDF.au3 cos I didn't need it.At the time this UDF was made, more than likely, these Constants where not defined. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
MrCreatoR Posted September 28, 2007 Share Posted September 28, 2007 The function _SysTrayIconPids() needs to be changed, so it will return a correct order of indexes in case that we have more then one similar process names:Func _SysTrayIconPids() Local $i Local $titles = _SysTrayIconTitles() Local $processes[UBound($titles)] Local $ret For $i = 0 to Ubound($titles)-1 $ret = DLLCall("user32.dll","int","GetWindowThreadProcessId", "int", _SysTrayIconHandle($i), "int_ptr", -1) If Not @error Then $processes[$i] = $ret[2] Next Return $processes EndFuncThanks to amel27 for the correction in this func.  Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1  AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ==================================================    AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
Skizmata Posted October 24, 2007 Share Posted October 24, 2007 Please help! Perhaps I'm being extraordinarily thick headed but I can't wrap my mind around this UDF. I run a few progs constantly on my home and work system and want to get something put together to clear these icons out of the tray. #include "SysTray_UDF.au3" MsgBox(0, "", WinGetProcess("Hamachi")) MsgBox(0, "", WinGetHandle("Hamachi")) MsgBox(0, "", _SysTrayIconIndex (WinGetProcess("Hamachi"))) MsgBox(0, "", _SysTrayIconIndex (WinGetHandle("Hamachi"))) The first two MsgBox()s return what you would assume they should (944 and 0x004C054A respectively) however MsgBox() 3 and 4 return -1. What am I doing wrong? The UDF seems to say that a PID or a Handle would work here. I assume if I get over this hump I can get _SysTrayIconRemove() to work and archive me goal. Thanks! AutoIt changed my life. Link to comment Share on other sites More sharing options...
BrettF Posted October 24, 2007 Share Posted October 24, 2007 Something like... ;=============================================================================== ; ; Function Name: _SysTrayIconIndex($name, $mode=0) ; Description: Get list of all processes id's that have systray icon ; Parameter(s): $name = process name / window title text ; $mode 0 = get index by process name (default) ; 1 = get index by window title ; Requirement(s): AutoIt3 Beta ; Return Value(s): On Success - Returns index of found icon ; On Failure - Returns -1 if icon for given process/wintitle ; was not found. ; - Sets error to 1 and returns -1 in case of bad ; arguments ; Author(s): Tuape ; ;=============================================================================== #include "SysTray_UDF.au3" MsgBox(0, "", WinGetProcess("Hamachi")) MsgBox(0, "", WinGetProcess("Hamachi")) MsgBox(0, "", _SysTrayIconIndex (WinGetProcess("Hamachi"), 0)) MsgBox(0, "", @error) MsgBox(0, "", _SysTrayIconIndex (WinGetProcess("Hamachi"), 0)) MsgBox(0, "", @error) What is the @error? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Skizmata Posted October 24, 2007 Share Posted October 24, 2007 The error returns 0. AutoIt changed my life. Link to comment Share on other sites More sharing options...
kjcdude Posted November 23, 2007 Share Posted November 23, 2007 perfect, worked like a charm integrated example 5 into my scripts Link to comment Share on other sites More sharing options...
kjcdude Posted November 29, 2007 Share Posted November 29, 2007 (edited) Due to the new update (v3.2.10.0), the following pieces of code are invalid.Changed: DllCall(): short_ptr, long_ptr, int_ptr types deprecated. Use short*, long* and int* respectively.Just making you aware so that the script can work for the new comers.----Even after replacing all instances, the script is not preforming correctly. Edited November 29, 2007 by kjcdude Link to comment Share on other sites More sharing options...
seres Posted December 27, 2007 Share Posted December 27, 2007 hello, the link contains the following: Parent Directory - SciTEUser.properties 28-Apr-2007 08:12 1.6K autoit-v3.2.10.0-rc-setup.exe 24-Nov-2007 10:11 6.6M autoit-v3.2.9.14-beta-setup.exe 21-Nov-2007 04:20 6.2M autoit-v3.2.9.14.exe 21-Nov-2007 04:20 6.5M docs/ 25-Jun-2006 11:34 - pcrepattern-7.3.html 28-Aug-2007 04:34 89K pcrepattern-7.4.html 23-Sep-2007 01:26 91K pcretest-7.3.exe 17-Sep-2007 12:49 174K pcretest-7.4.exe 25-Sep-2007 00:22 175K sav/ 23-Nov-2007 06:55 - undocumented/ 20-Dec-2006 03:41 - i tried the autoit-v3.2.9.14-beta-setup.exe 21-Nov-2007 04:20 6.2M but it gives me errors, do i need a diferent scite or other file thanks Link to comment Share on other sites More sharing options...
Xenobiologist Posted December 27, 2007 Share Posted December 27, 2007 Hi, I guess systray.au3 needs an update. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
tuape Posted January 19, 2008 Author Share Posted January 19, 2008 Hi,Unfortunately I had completely missed this in VirtualFreeEx documentation in MSDN:"dwSize The size of the region of memory to free, in bytes. If the dwFreeType parameter is MEM_RELEASE, dwSize must be 0 (zero). The function frees the entire region that is reserved in the initial allocation call to VirtualAllocEx."This was causing a huge memory leak when running these functions in a loop.Corrected UDF in the first post. Link to comment Share on other sites More sharing options...
Lord Freshy Posted January 20, 2008 Share Posted January 20, 2008 (edited) kinda have a problem with this UDF in a function yes, i included the SysTray_UDF.au3 i wanted to double click a tray icon so i made this simple func using 2 funcs from the UDF: Func clickfunc() $index = _SysTrayIconIndex("process.exe", 0) $pos = _SysTrayIconPos($index) MouseClick("left", $pos[0], $pos[1], 2) EndFunc when i tested this independently, it worked but in the script, the scite console gives me these errors: C:\Programas\AutoIt3\Include\SysTray_UDF.au3(37,50) : ERROR: $WM_GETTEXT previously declared as a 'Const' Const $WM_GETTEXT = 13 ; Included in GUIConstants ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Programas\AutoIt3\Include\SysTray_UDF.au3(38,36) : ERROR: $PROCESS_ALL_ACCESS previously declared as a 'Const' Const $PROCESS_ALL_ACCESS = 2035711 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Utilizador\Ambiente de trabalho\folder\script.au3 - 2 error(s), 0 warning(s) i have prod autoit 3.2.10.0. Edited January 20, 2008 by Lord Freshy Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now