Jump to content
Sign in to follow this  
Sokko

MsgBox icon confusion

Recommended Posts

Sokko

Okay, I'm really confused about how message boxes are assigned taskbar icons, specifically in a compiled script. Running the script directly, the icon in the taskbar for message boxes is always the default AutoIt3 icon. As a test, I compiled this script to an EXE and gave it a different icon, one of the "disk" icons provided with AUT2EXE. As I had hoped, the message box icons in the taskbar changed to a disk. Now, I thought, the taskbar icons depend on what icon is given to the EXE when you compile it.

Now I tried putting in a different icon and compiling the script again. The problem is, while the EXE was given the correct icon, the message boxes retained the disk icon that was given to them in a prior compile. I have tried everything to get rid of that disk, going so far as to completely uninstall and reinstall AutoIt and SciTe, but still the disk icon persists. This problem is utterly inscrutable to me, since as far as I can tell there is no possible way for that disk icon to be stored anywhere that would have survived a total reinstall. How can I change the taskbar icon of those message boxes? Even just going back to the default AutoIt3 icon would be preferable to this stupid disk!

Share this post


Link to post
Share on other sites
SupraNatural

Okay, I'm really confused about how message boxes are assigned taskbar icons, specifically in a compiled script. Running the script directly, the icon in the taskbar for message boxes is always the default AutoIt3 icon. As a test, I compiled this script to an EXE and gave it a different icon, one of the "disk" icons provided with AUT2EXE. As I had hoped, the message box icons in the taskbar changed to a disk. Now, I thought, the taskbar icons depend on what icon is given to the EXE when you compile it.

Now I tried putting in a different icon and compiling the script again. The problem is, while the EXE was given the correct icon, the message boxes retained the disk icon that was given to them in a prior compile. I have tried everything to get rid of that disk, going so far as to completely uninstall and reinstall AutoIt and SciTe, but still the disk icon persists. This problem is utterly inscrutable to me, since as far as I can tell there is no possible way for that disk icon to be stored anywhere that would have survived a total reinstall. How can I change the taskbar icon of those message boxes? Even just going back to the default AutoIt3 icon would be preferable to this stupid disk!

<{POST_SNAPBACK}>

Have you tried GUISetIcon or #NoTrayIcon? Also are you compiling with options and changing from the disk?

Visit http://www.blizzedout.com/forums/register....referrerid=8306 for the top blizzard hacks. WoW, TfT, D2/LOD, CS. You name it we got it!

Share this post


Link to post
Share on other sites
Sokko

Have you tried GUISetIcon or #NoTrayIcon?

I'm talking about the taskbar icons given to MsgBox's, so neither of those apply.

Also are you compiling with options and changing from the disk?

Yes, compiling with options is how I'm giving icons to the EXE, and the icon I choose is always NOT the disk icon, but all MsgBox's generated by the script still have it.

Edited by Sokko

Share this post


Link to post
Share on other sites
SupraNatural

I'm talking about the taskbar icons given to MsgBox's, so neither of those apply.

Yes, compiling with options is how I'm giving icons to the EXE, and the icon I choose is always NOT the disk icon, but all MsgBox's generated by the script still have it.

<{POST_SNAPBACK}>

Have you tried changing the flag for the msgbox icon? Other than that i'd have to see your script myself or part of it with a msgbox. If you want I can compile it here with defualt icon and send it back to see if it helps

Visit http://www.blizzedout.com/forums/register....referrerid=8306 for the top blizzard hacks. WoW, TfT, D2/LOD, CS. You name it we got it!

Share this post


Link to post
Share on other sites
Sokko

The MsgBox icon flag only changes the large icon that is displayed within the actual message box.

This is rather maddening, I've been trying to reproduce the problem and it just won't happen. The evil message box taskbar disk icon only shows up when I compile this particular script, all others turn out fine and show the default AutoIt3 icon. I can't imagine what happened to get the disk icon "locked on" to the script, but I even deleted the ICO file of the disk and it still showed up.

EDIT: The problem disappears when I rename the script file to something else and recompile it. This would appear to indicate that some aspect of the compiler has the disk icon locked in memory for this particular filename. How could that happen?

Edited by Sokko

Share this post


Link to post
Share on other sites
Sokko

Weirdly, Resource Hacker shows no disk icon in the EXE. Weirder still, simply renaming the compiled EXE is enough to make the disk icon go away. This would seem to imply that some part of the operating system is actually causing the problem, and it's nothing to do with AutoIt at all. I have no idea what would make the OS randomly decide "every time an application with this name is run, its default dialog box icon will be a disk", but it looks like that's exactly what happened. At least I know now that it's probably a computer-specific thing and won't appear on anybody else's machine.

Share this post


Link to post
Share on other sites
erifash

Try renaming a different script (with a msgbox in it) to the messed-up one and compiling it. It also might have something to do with the registry.

Share this post


Link to post
Share on other sites
Sokko

Try renaming a different script (with a msgbox in it) to the messed-up one and compiling it.

Did you one better: I compiled a different script, then renamed the executable. Lo and behold, the message boxes had disk icons in the taskbar. You're probably right, it's something messed up in the registry. How would I go about fixing that, or is it possible? It's not like I need to use that particular filename, but if this happens with other names in the future...

Share this post


Link to post
Share on other sites
therks

Something similar actually came up in another topic a little while back...

It is a cache type thing. Not sure where it stores the stuff, but Explorer does cache icons. There are a few options. If you have TweakUI you can go to the last entry (Repair) and choose 'Rebuild Icons'.

Alternatively, you can download this program, RebIC (Rebuild Icon Cache) from here. I have a shortcut to that in my Start Menu.

And lastly, I found this while searching for the location of RebIC. Barely skimmed it myself, but it might be useful.

<{POST_SNAPBACK}>

Share this post


Link to post
Share on other sites
Sokko

Thanks a lot! As luck would have it, my registry tweaker includes a Rebuild Icon Cache button. Disk icon, begone! :whistle:

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  

×