0

So i have a problem with updating the icon for my gui. I want to have it so when i press a button the icon changes, and when i press another button it changes to a different icon.

I can change the icon once when i create the gui with this script:

gui, show, w0 h0
Menu, Tray, Icon, %A_WorkingDir%\Files\Red_Icon.ico, 1, 1
gui, destroy

But i cant seem to be able to change it multiple times without restartin the window

So im wondering how i change the icon multiple times/How to uppdate to icon

Also, Im talking about both the icon on the taskbar!

Somin
  • 1

2 Answers2

1

Here's a stab at changing the taskbar icon, but you'll soon face an inherent limitation as discussed in the same thread and another referred to in it.

There's also a workaround, which, however, I find too drastic.

johnlee
  • 394
  • 3
  • 7
0

Very similar questions were just asked and answered here:

Change autohotkey tray icon from within script

AutoHotKey, Updating Icons

These should give you a head start on correcting your issue.

Eric King
  • 103
  • 3
  • 18