RedSkull92 Posted April 14, 2009 Share Posted April 14, 2009 How can I draw the icon (from file .exe) on the desktop ? (Extract Icon from file and write the icon on the desktop) Thank's Link to comment Share on other sites More sharing options...
KaFu Posted April 14, 2009 Share Posted April 14, 2009 Maybe with FileCreateShortcut() ? OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
nitekram Posted April 14, 2009 Share Posted April 14, 2009 Maybe with FileCreateShortcut() ?I think OP wants the *.ico file that goes to the *.exe file? If that is the case just copy it to the desktop. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
RedSkull92 Posted April 14, 2009 Author Share Posted April 14, 2009 No I want to extract a icon file to exe Example-> utorrent.exe -> utorrent.ico (The icon file to Exe) _WinAPI_ExtractIconEx don't work or I don't know how to use it. Link to comment Share on other sites More sharing options...
nitekram Posted April 14, 2009 Share Posted April 14, 2009 (edited) No I want to extract a icon file to exeExample-> utorrent.exe -> utorrent.ico (The icon file to Exe)_WinAPI_ExtractIconEx don't work or I don't know how to use it.You want to use an icon for your exe?EDIT 13. How can I use a custom icon when compiling my scripts?You need to run the full compiler program (rather than just right-clicking a script and selecting compile). When you compile a script it will let you create a custom icon that you can then use for your program Edited April 14, 2009 by nitekram 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
JackDinn Posted April 14, 2009 Share Posted April 14, 2009 (edited) think hes meaning he wants to generate a .ico from an .exe, but if you have the .exe why cant you just make a shortcut on the DT and you get the icon. Edited April 14, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
AoRaToS Posted April 14, 2009 Share Posted April 14, 2009 (edited) Maybe what you need is FileInstall() check the Helpfile... Edited April 14, 2009 by AoRaToS s!mpL3 LAN Messenger Current version 2.9.9.1 [04/07/2019] s!mpL3 LAN Messenger.zip s!mpL3 Link to comment Share on other sites More sharing options...
KaFu Posted April 14, 2009 Share Posted April 14, 2009 To extract icons I recommend the freeware program @icon sushihttp://www.towofu.net/soft/e-index.php OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
JackDinn Posted April 14, 2009 Share Posted April 14, 2009 (edited) or i like IconJack, but not sure if you can extract from .exe with it (never tried) Edited April 14, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
yehia Posted April 15, 2009 Share Posted April 15, 2009 im having the same problem today hope some one can point us i got the dll call but still cant save it to ico file My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
oMBRa Posted April 15, 2009 Share Posted April 15, 2009 #include <WinApi.au3> $hDC = _WinAPI_GetDC(0) ;0 = desktop window $pIcon = @WindowsDir & '\explorer.exe' ; path of the icon $iconStruct = DllStructCreate("int Handle") _WinAPI_ExtractIconEx($pIcon, 0, DllStructGetPtr($iconStruct), 0, 1) While 1 _WinAPI_DrawIcon($hDC, 200, 200, DllStructGetData($iconStruct, "Handle", 1)) Sleep(100) WEnd Func OnAutoitExit() _WinAPI_ReleaseDC(0, $hDC) EndFunc ;==>OnAutoitExit Link to comment Share on other sites More sharing options...
RedSkull92 Posted April 15, 2009 Author Share Posted April 15, 2009 thank's, but i can save the icon on the desktop. (.ico) How can it ? this: #include <WinApi.au3> $hDC = _WinAPI_GetDC(0) ;0 = desktop window $pIcon = @WindowsDir & '\explorer.exe' ; path of the icon $iconStruct = DllStructCreate("int Handle") _WinAPI_ExtractIconEx($pIcon, 0, DllStructGetPtr($iconStruct), 0, 1) While 1 _WinAPI_DrawIcon($hDC, 200, 200, DllStructGetData($iconStruct, "Handle", 1)) Sleep(100) WEnd Func OnAutoitExit() _WinAPI_ReleaseDC(0, $hDC) EndFunc ;==>OnAutoitExit draw the icon on the screen, while I want save a icon in a file (.ico) How can I ? Thank's Link to comment Share on other sites More sharing options...
nitekram Posted April 15, 2009 Share Posted April 15, 2009 Try this link if this is not what you want - please explain it better. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
JackDinn Posted April 15, 2009 Share Posted April 15, 2009 ahh beaten to it, Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
yehia Posted April 15, 2009 Share Posted April 15, 2009 thats it manhttp://www.autoitscript.com/forum/index.ph...mp;#entry670142was just posted 2 min ago My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine 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