Jump to content

kadel

Members
  • Posts

    6
  • Joined

  • Last visited

About kadel

  • Birthday 03/18/1981

Profile Information

  • Location
    Argentina

kadel's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Wonderful script thank you very much for your help
  2. Thanks for your answer but... We're not talking about using other programs, we are talking about the code of AutoIt.
  3. and how? I add the code to open the browser and all the icons are still keeping in 32 pixel .. and bad, with a black background $sFileName = @SystemDir & '\shell32.dll' ; Create a structure to store the icon index $stIcon = DllStructCreate("int") $stString = DLLStructCreate("wchar[260]") $structsize = DllStructGetSize($stString)/2 DllStructSetData($stString, 1, $sFileName) ; Run the PickIconDlg - '62' is the ordinal value for this function DllCall("shell32.dll", "none", 62, "hwnd", 0, "ptr", DllStructGetPtr($stString), "int", $structsize, "ptr", DllStructGetPtr($stIcon)) $sFileName = DllStructGetData($stString, 1) $nIconIndex = DllStructGetData($stIcon, 1) ; Show the new filename and icon index ;~ Msgbox(0, "Info", "Last selected file: " & $sFileName & @LF & "Icon-Index: " & $nIconIndex) $Ret = DllCall("shell32","long","ExtractAssociatedIcon","int",0,"str",$sFileName,"int*",$nIconIndex) $hIcon = $Ret[0] _GDIPlus_Startup() $pBitmap = DllCall($ghGDIPDll,"int","GdipCreateBitmapFromHICON", "ptr",$hIcon, "int*",0) $pBitmap = $pBitmap[2] _GDIPlus_ImageSaveToFile($pBitmap, @DesktopDir & "\test.png") _GDIPlus_ImageDispose($pBitmap) _GDIPlus_Shutdown() _WinAPI_DestroyIcon($Ret[0]) Any ideas how to solve this problem of black background and save them in 48 pixel ..?
  4. but this indicates the index of the icon ... not pixel
  5. Thanks for responding. But what I do is to directly extract icons 48 x 48 The code draws the 32 x 32 and look bad.
  6. Hello friends. Searching the forum found this code and works perfect. ; icon to JPEG & PNG converter - use first icon in EXE only ; based upon progandy's scripts ; ; nobbe 2008 ; #include <GDIPlus.au3> $filename = "C:\WINDOWS\explorer.exe" $iconnumber = 0 $Ret = DllCall("shell32","long","ExtractAssociatedIcon","int",0,"str",$filename,"int*",$iconnumber) $hIcon = $Ret[0] _GDIPlus_Startup() $pBitmap = DllCall($ghGDIPDll,"int","GdipCreateBitmapFromHICON", "ptr",$hIcon, "int*",0) $pBitmap = $pBitmap[2] _GDIPlus_ImageSaveToFile($pBitmap, @ScriptDir & "\Test.jpg") _GDIPlus_ImageSaveToFile($pBitmap, @ScriptDir & "\Test.png") _GDIPlus_ImageDispose($pBitmap) _GDIPlus_Shutdown() _WinAPI_DestroyIcon($Ret[0]) Someone can help me modify it to save the icons in 48 x 48 Pixel. From already thank you very much for helping.
×
×
  • Create New...