Jump to content
Sign in to follow this  
mattw112

Tray Icon on Windows 7

Recommended Posts

mattw112

I am trying to test the trayseticon command. Nothing fancy.

Basically:

TraySetIcon("wucltux.dll", 1)
While 1
   Sleep (60000)
WEnd

But for some reason the autoit icon is always the same old one. I've also tried using the full path to the dll with no luck.

Thanks,

Terry

Share this post


Link to post
Share on other sites
mattw112

By the way it is Windows 7 X64. Not sure if it matters though.

Terry

Share this post


Link to post
Share on other sites
mattw112

Works for me ...same OS

Jos

Really?!? All I get when it launches it the normal AutoIt tray icon??

Any idea what could cause it to be different?

Thanks,

Terry

Share this post


Link to post
Share on other sites
mattw112

Are you x64 as well? or just same OS?

terry

Share this post


Link to post
Share on other sites
KaFu

Win7 64bit Ultimate here, and it works too. Maybe there's a problem with you environment variables / dll location? You refer to "wucltux.dll" without a path...

Edited by KaFu

Share this post


Link to post
Share on other sites
ShawnW

Icon looks like "available updates" icon.

I hope he is not trying to write some fake windows updater.

Share this post


Link to post
Share on other sites
mattw112

I hope he is not trying to write some fake windows updater.

lol,

no

We use SCCM with WSUS to do updates and are looking to write something so the end users know more about what is going on as well as giving them more options around rebooting after updates are installed.

Right now just experimenting with this. Could use any icon I just thought this one would look familiar.

Terry

Edited by mattw112

Share this post


Link to post
Share on other sites
mattw112

Win7 64bit Ultimate here, and it works too. Maybe there's a problem with you environment variables / dll location? You refer to "wucltux.dll" without a path...

I've tried with a path too, with no luck.

Not sure what would be messed up,

This is a pretty straight forward build of Windows 7 enterprise X64.

hmm...

Thanks,

terry

Share this post


Link to post
Share on other sites
sander1991

why do you need a tray icon? why not just remove it with #NoTrayIcon

Share this post


Link to post
Share on other sites
mattw112

why do you need a tray icon? why not just remove it with #NoTrayIcon

Because we want the tray icon?? not sure I understand.

Like I stated we want to have the tray icon, we just want it to give better information

I still can't get it to work on my Win 7 enterprise x64 machine, not sure why pretty straight forward code.

I'll keep trying.

Terry

Share this post


Link to post
Share on other sites
GEOSoft

You are not by any chance using another trayseticon() someplace else in the script are you?


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
mattw112

You are not by any chance using another trayseticon() someplace else in the script are you?

Nope just doing this basic code

TraySetIcon("wucltux.dll", 1)
While 1
   Sleep (60000)
WEnd

That's it for the whole script.

Terry

Share this post


Link to post
Share on other sites
mistaecko

Having the same problem here on Windows 7 Ultimate x64.

Trayicon will not change, tried about 3 different exe's in different locations, using relative and absolute paths.

Seems that other trayicon related functions don't work either (like TrayCreateItem).

When clicking the AutoIT icon a red x will flash up (even with the reduced script only using TraySetIcon. I am absolutely new to AutoIT, so not sure if this is the expected behavior or not.

Used the installer to setup AutoIT. It installs to Program Files(x86), but includes the 64bit version AFAIK.

Share this post


Link to post
Share on other sites
Authenticity

Try TraySetIcon example from the help file. If the icon number is the ordinal number, you should use negative numbers.

Share this post


Link to post
Share on other sites
mistaecko

Well, guess what, it works now!

I tried for surely an hour last night but couldn't get it to work, but only posted here on the forum today - without running the script again.

I wanted to verify that TrayCreateItem will cause the script to fail as well... when it didn't I changed the code back and everything working now as expected... I dare say that the code exactly matches the version from last night (that failed). Maybe I missed something.

Or maybe some AutoIT dlls not being properly registered until after a restart? Just speculating here, since I don't really have a clue :mellow:

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.