Any ideas how could one get the 256px icon from UWP apps? Settings, Calculator, Store, etc.
I've been reading that SHLoadIndirectString could retrieve the icon. This script by @just me uses it to get the icon.
Can someone help me? Here's what I have so far:
I've been reading that SHLoadIndirectString could retrieve the icon. This script by @just me uses it to get the icon.
Can someone help me? Here's what I have so far:
CODE:
#Requires AutoHotkey v2.0
User32Path := A_WinDir "\System32\user32.dll"
pIconCount := 0
MyGui := Gui()
ProgramsLV := MyGui.Add("ListView", "+Icon w640 h640 r1", ["hWnd"])
; Create ImageList
pIL := DllCall("comctl32.dll\ImageList_Create", "int", 100, "int", 100, "uint", 0x20, "int", 10, "int", 10)
ProgramsLV.SetImageList(pIL)
AllWins := WinGetList()
for hWnd in AllWins
{ IconImg := 0
Path := WinGetProcessPath(hWnd)
Name := WinGetTitle(hWnd)
; Get Icon
DllCall("PrivateExtractIcons","str",Path,"int",0,"int",256,"int",256 ,"uint*",&IconImg,"uint*",0,"uint",1,"uint",0,"int")
if !(IconImg) ; If no Icon, get system one
DllCall("PrivateExtractIcons" ,"str",User32Path,"int",5,"int",256,"int",256 ,"uint*",&IconImg,"uint*",0,"uint",1,"uint",0,"int")
DllCall("comctl32.dll\ImageList_ReplaceIcon", "uint", pIL, "int", -1, "uint", IconImg)
pIconCount += 1
ProgramsLV.Add("Icon" pIconCount, Name)
}
MyGui.Show()
#s::Reload
Statistics: Posted by a_bolog — 47 minutes ago