Reference to post: http://www.autohotkey.com/board/topic/5 ... file-icon/
I couldn't get what SCAN did to work, since I'm using windows7 and not XP. I tried using ResoureHacker to remove the icons from the program, but that didn't work either. The hope in this is to be able to change the taskbar icon for AHK message boxes.
thanks
Any way to change the AHK icons?
- dangerdogL2121
- Posts: 173
- Joined: 01 Oct 2013, 23:11
Re: Any way to change the AHK icons?
SKAN's (not SCAN's) post has nothing to do with the taskbar icon. It is only for the icon associated with .ahk files.
Replacing the icon resources using Resource Hacker will work if you are using it correctly. It cannot fail, since if you replace the icon resources there will be nowhere for AutoHotkey to get the original icons from...
Replacing the icon resources using Resource Hacker will work if you are using it correctly. It cannot fail, since if you replace the icon resources there will be nowhere for AutoHotkey to get the original icons from...
- dangerdogL2121
- Posts: 173
- Joined: 01 Oct 2013, 23:11
Re: Any way to change the AHK icons?
Yes, I was able to change the icon associated with certain scripts with Resource Hacker.
thanks
What I was thinking was that I could replace the icon resources of the icon that is displayed on the taskbar. That way, I might be able to insert my own script taskbar icon. Do you know if this is possible?Replacing the icon resources using Resource Hacker will work if you are using it correctly. It cannot fail, since if you replace the icon resources there will be nowhere for AutoHotkey to get the original icons from...
thanks
- emmanuel d
- Posts: 90
- Joined: 17 Nov 2013, 04:45
Re: Any way to change the AHK icons?
From our boy SKAN:You can tweak it to change the icon of your script.
It also apply's to the taskbar icon.
Code: Select all
#Persistent
Ico := A_Temp "\remums.ico"
IfNotExist, %ICO%, URLDownloadToFile
, http://dl.dropboxusercontent.com/u/6428211/Gentee/RemUMS/v1-0/RemUMS.ico,%ICO%
Menu,Tray,Icon,%Ico%
Run, Notepad.exe,,, PID
Winwait, ahk_pid %PID%
ID := WinExist("ahk_pid" PID)
hIcon := DllCall( "LoadImage", UInt,0, Str,Ico, UInt,1, UInt,0, UInt,0, UInt,0x10 )
SendMessage, 0x80, 0, hIcon ,, ahk_id %ID% ; One affects Title bar and
SendMessage, 0x80, 1, hIcon ,, ahk_id %ID% ; the other the ALT+TAB menu
SetTimer, CheckID, 1000
Return
CheckID:
If ! WinExist( "ahk_id" ID )
ExitApp
Return
It also apply's to the taskbar icon.
Last edited by SKAN on 18 Nov 2013, 16:56, edited 2 times in total.
Reason: Fixed non-working urldownloadtofile link
Reason: Fixed non-working urldownloadtofile link
- dangerdogL2121
- Posts: 173
- Joined: 01 Oct 2013, 23:11
Re: Any way to change the AHK icons?
Thanks emmanuuel d and great job SKAN.
Its cool but not exactly what I was looking for.
Somthing like this except the script's taskbar icon should change too.
But as lexicos pointed out, ResHack will work if I use it correctly. I just haven't got around to doing it yet, and its not high up in my ahk priority list.
thanks
Its cool but not exactly what I was looking for.
Somthing like this except the script's taskbar icon should change too.
Code: Select all
#Persistent
Ico := A_Temp "\remums.ico"
IfNotExist, %ICO%, URLDownloadToFile
, http://dl.dropboxusercontent.com/u/6428211/Gentee/RemUMS/v1-0/RemUMS.ico,%ICO%
Menu,Tray,Icon,%Ico%
Gui, add, text, , look at this
Gui, show, Center h100 w100, gui 1
WinGet, ID, ID, gui 1
hIcon := DllCall( "LoadImage", UInt,0, Str,Ico, UInt,1, UInt,0, UInt,0, UInt,0x10 )
SendMessage, 0x80, 0, hIcon ,, ahk_id %ID% ; One affects Title bar and
SendMessage, 0x80, 1, hIcon ,, ahk_id %ID% ; the other the ALT+TAB menu
SetTimer, CheckID, 1000
Return
CheckID:
If ! WinExist( "ahk_id" ID )
ExitApp
Return
thanks
- emmanuel d
- Posts: 90
- Joined: 17 Nov 2013, 04:45
Re: Any way to change the AHK icons?
You must be on win 7 or something because on XP Taskbaricon changes fine.
I see sombody can edit my post
I had just copy pasted from the "OLD forum" did not check the links
I see sombody can edit my post
I had just copy pasted from the "OLD forum" did not check the links
- dangerdogL2121
- Posts: 173
- Joined: 01 Oct 2013, 23:11
Re: Any way to change the AHK icons?
Yeah, I'm on Windows 7.
Who is online
Users browsing this forum: No registered users and 135 guests