AlmarM Posted October 11, 2008 Share Posted October 11, 2008 Hi, Im trying to create an application launcher. But I need to create a button with the icon of the .exe the user chooses. I did some search work but no result. I mean, I found topics about this but its not very clear. Hope you understand ^^, AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Cdma1X Posted October 11, 2008 Share Posted October 11, 2008 $Almar_Icon = GUICtrlCreateIcon($Path, 0, $Left, $Top, $Width, $Height) While 1 $GUI_MSG = GUIGetMsg() Switch $GUI_MSG Case $Almar_Icon MsgBox(0, "Test", "You clicked a icon") EndSwitch WEnd Link to comment Share on other sites More sharing options...
Zedna Posted October 11, 2008 Share Posted October 11, 2008 Try GUICtrlSetImage($your_button, 'C:\path\your-app.exe') Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Aceguy Posted October 11, 2008 Share Posted October 11, 2008 http://www.autoitscript.com/forum/index.ph...14&hl=super [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
maroesjk Posted October 11, 2008 Share Posted October 11, 2008 I've used some code from Smashly to extract an icon from the executable the user picks in my program Portable App Creator. Both are too large to explain here shortly, but if you're an experienced AutoIt user, you'll find what you want via those two links... Link to comment Share on other sites More sharing options...
AlmarM Posted October 14, 2008 Author Share Posted October 14, 2008 (edited) Well, this is the topic I ment. AlmarM EDIT: Does anyone know how to get the icon from a .exe? Edited October 14, 2008 by AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Mojo Posted October 14, 2008 Share Posted October 14, 2008 Well, this is the topic I ment.AlmarMStill no solution found, mate? Or do you have what you need by now?Let me know, and I might help you if you still need it.cheers You can fool some of the people all of the time, and all of the people some of the time, but you can not fool all of the people all of the time. Abraham Lincoln - http://www.ae911truth.org/ - http://www.freedocumentaries.org/ Link to comment Share on other sites More sharing options...
AlmarM Posted October 14, 2008 Author Share Posted October 14, 2008 Still no solution found, mate? Or do you have what you need by now?Let me know, and I might help you if you still need it.cheersMy last reply was 4 minutes ago I still need to know how to get the ICON from a .EXE the user selects.AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Mojo Posted October 14, 2008 Share Posted October 14, 2008 My last reply was 4 minutes ago I still need to know how to get the ICON from a .EXE the user selects.AlmarMYeah, I saw that, but since there were a few hints posted some days ago, I thought you might have solved it.Okay, let me check my scripts and I'll get back to you. You can fool some of the people all of the time, and all of the people some of the time, but you can not fool all of the people all of the time. Abraham Lincoln - http://www.ae911truth.org/ - http://www.freedocumentaries.org/ Link to comment Share on other sites More sharing options...
AlmarM Posted October 14, 2008 Author Share Posted October 14, 2008 Ok, thank you for helping ^^, AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Mojo Posted October 14, 2008 Share Posted October 14, 2008 Ok, thank you for helping ^^, AlmarM #include <ButtonConstants.au3> GUICreate("GUI") $button = GUICtrlCreateButton("", 10, 20, 40, 40, $BS_ICON) GUISetState () While 1 $GUI_MSG = GUIGetMsg() Switch $GUI_MSG Case -3 Exit Case $button GUICtrlSetImage($button, FileOpenDialog("choose an exe", "", "Executables (*.exe)", 3), 1) EndSwitch WEnd works for me (with WinXP Pro SP3) cheers You can fool some of the people all of the time, and all of the people some of the time, but you can not fool all of the people all of the time. Abraham Lincoln - http://www.ae911truth.org/ - http://www.freedocumentaries.org/ Link to comment Share on other sites More sharing options...
AlmarM Posted October 14, 2008 Author Share Posted October 14, 2008 Well thank you! your my saving angel ^^, AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Mojo Posted October 14, 2008 Share Posted October 14, 2008 Well thank you!your my saving angel ^^,AlmarM glad I could help.Now and then I also have to contribute something to this great community have a nice day You can fool some of the people all of the time, and all of the people some of the time, but you can not fool all of the people all of the time. Abraham Lincoln - http://www.ae911truth.org/ - http://www.freedocumentaries.org/ 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