Miranda Posted April 29, 2010 Share Posted April 29, 2010 (edited) Hey there, Thanks for reading This is my script so far: (credit to trancexx, who posted it somewhere else before) _GUISetIcon(WinGetHandle("[ACTIVE]", ""), "don't", "care") ; name, not ordinal value Func _GUISetIcon($hGui, $sModule, $iName) ; for loaded modules in this shape $iName="G:\Srips\AO\burn.ico" $a_hCall = DllCall("user32.dll", "hwnd", "LoadImage", _ "hwnd", 0, _ "str", $iName, _ "dword", 1, _ ; IMAGE_ICON "int", 32, _ ;32 "int", 32, _ ;32 "dword", 0x10) ; LR_DEFAULTCOLOR Local $hIcon = $a_hCall[0] DllCall("user32.dll", "hwnd", "SendMessage", _ "hwnd", $hGui, _ "dword", 0x0080, _ ; WM_SETICON "dword", 0x1, _ ; 1 = ICON_BIG, 0 = ICON_SMALL "ptr", $hIcon) EndFunc ;==>_GUISetIcon I've checked, the first function gives a handle, what I've managed to get done (by playing around with dword 0x0, iconbig/iconsmall, and the sizes from loadimage) is to change the icon at the top left of a window, which then few seconds later vanishes, aswell as the alt-tab icon vanishing completely, and the icon permanentely changed in the taskbar. What I'm trying to do is the alt-tab icon, the rest don't matter to me... I know this is not strictly an autoit problem, but maybe someone has an idea anyhow? Thanks alot for reading and any answers Kind regards, Miranda Edited May 4, 2010 by Miranda Link to comment Share on other sites More sharing options...
Miranda Posted May 1, 2010 Author Share Posted May 1, 2010 Might want to add that I tried this on a Windows 7 64 bit, and a Windows XP 32 bit, the difference was that on windows xp the alt-tab icon didn't vanish. Oh, and if anyone has a different reliable method of changing the alt-tab icon to something else, please do let me know. Thanks Link to comment Share on other sites More sharing options...
Miranda Posted May 4, 2010 Author Share Posted May 4, 2010 The solution is so damn simple it hurts... The icon only stays changed while the script is running, a simple while + sleep loop makes it all work 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