Deye Posted February 3, 2016 Share Posted February 3, 2016 Hi, I have assigned a program script to launch at logon with Task scheduler. The program needs to be used also with the systray icon, but the icon wont appear Off course the program appears as running in task manager but with no icon. If it has anything to do with compiling with #pragma compile or #AutoIt3Wrapper for the icon, I have tried both. Anyone have an idea as to what might cause this or know of a fix ? ITIA Link to comment Share on other sites More sharing options...
AutoBert Posted February 3, 2016 Share Posted February 3, 2016 Use TraySetIcon. Have a look in the help if needed for undrstanding. Deye 1 Link to comment Share on other sites More sharing options...
Deye Posted February 3, 2016 Author Share Posted February 3, 2016 Thanks but still no luck I have: Opt("TrayOnEventMode", 1) ; Use event trapping for tray menu Opt("TrayMenuMode", 3) ; Default tray menu items will not be shown. added: TraySetState($TRAY_ICONSTATE_SHOW) removed the #NoTrayIcon at top of the script added: #include <TrayConstants.au3> Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 3, 2016 Moderators Share Posted February 3, 2016 @Deye if you just manually run the script I assume the trayicon is created? Just looking for confirmation the issue is only when it is run on startup. Deye 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Deye Posted February 3, 2016 Author Share Posted February 3, 2016 (edited) yes. at logon task. created with Task scheduler 5 minutes ago, JLogan3o13 said: the issue is only when it is run on startup. Edited February 3, 2016 by Deye Link to comment Share on other sites More sharing options...
Deye Posted February 3, 2016 Author Share Posted February 3, 2016 ok just added a slight delay and it fine now thanks for the help guys Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 3, 2016 Moderators Share Posted February 3, 2016 Glad you worked it out, that was going to be my suggestion. There is so much going on at startup, I usually add anywhere from a 250-500ms delay "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Deye Posted October 27, 2016 Author Share Posted October 27, 2016 (edited) Hi, Its been like 10 months and I have noticed I'm still having this issue even when adding a long delay like 12 seconds On some logons the process will just run without its systray icon. (most of the times it runs as expected.) Maybe if there was some way to detect its absence then I could probably make the process restart (till the icon appears) does anyone have some idea of writing a function that will be able do just that ? Of course any other ideas are most welcome TIA Edit: I'm going to try out This function by Melba and see how it goes (Thanks Melba) Edited October 27, 2016 by Deye Link to comment Share on other sites More sharing options...
orbs Posted October 27, 2016 Share Posted October 27, 2016 @Deye, may i suggest trying other methods of running your script at logon? this has been working for me with no issue whatsoever for years now: add a registry entry for your script in "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run". you can also try this: put a shortcut in the common "Startup" start menu folder (typically "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup" on Windows 7). Deye 1 Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
Deye Posted October 27, 2016 Author Share Posted October 27, 2016 orbs, Thanks for the heads up, Those are most probably, the more correct ways I should have looked into, to begin with. 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