Uten Posted March 27, 2006 Share Posted March 27, 2006 (edited) I want to make a application launcher resting in the tray. When I click the TrayIcon I want to get a menu with the names of the applications and the icons assosiated with the application. In my case the icon assosiated with the application must be extracted from the executable. It is not found in the registry.If you use VC to make your programs I the function SHGetFileInfo (in shell32.dll) and friends would give you access to the icons (I belive?). But according to this thread Obtain icon associated with file type, two difficulties "DllCall(... "SHGetFileInfo" ...) will not work due to the structures requiered by the function". So is there a simple slick autoit way to do this?EDIT:I have added a udf, TrayMenuEx to do this. Not a slick way, but sort of a solution in many cases. Edited March 30, 2006 by Uten Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 27, 2006 Moderators Share Posted March 27, 2006 Have you tried just using the exe name? Example:$main = GUICreate('main') GUICtrlCreateIcon(@ProgramFilesDir & '\AutoIt3\AutoIt3.exe', '', 10, 10) GUISetState() While 1 If GUIGetMsg() = - 3 Then Exit WEnd Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 27, 2006 Moderators Share Posted March 27, 2006 Have you tried just using the exe name? Example:$main = GUICreate('main') GUICtrlCreateIcon(@ProgramFilesDir & '\AutoIt3\AutoIt3.exe', '', 10, 10) GUISetState() While 1 If GUIGetMsg() = - 3 Then Exit WEnd Edit: After reading your post again, I may be a tad off base . Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Uten Posted March 27, 2006 Author Share Posted March 27, 2006 (edited) Edit:After reading your post again, I may be a tad off base .Ohh, If you only knew how I wish you were not Do you (or anyone else) know if it is possible to get a handel or pointer to the icon (bmp) used by GUICtrlCreateIcon or set by GUICtrlSetImage?EDIT: typo Edited March 27, 2006 by Uten Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted March 27, 2006 Moderators Share Posted March 27, 2006 Ohh, If you only knew how I wish you were not Do you (or anyone else) know if it is possible to get a handel or pointer to the icon (bmp) used by GUICtrlCreateIcon or set by GUICtrlSetImage? EDIT: typoIf I understand you right just assign it a variable. $Icon = GUICtrlCreateIcon(@ProgramFilesDir & '\AutoIt3\AutoIt3.exe', '', 10, 10) Link to comment Share on other sites More sharing options...
Uten Posted March 27, 2006 Author Share Posted March 27, 2006 If I understand you right just assign it a variable. $Icon = GUICtrlCreateIcon(@ProgramFilesDir & '\AutoIt3\AutoIt3.exe', '', 10, 10) I'm afraid you misunderstod. This will return the controlID and not a pointer to the icon or bmp. But if I knew how to get a handel to the icon/bmp used by controlID that could possibly be a solution. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Uten Posted March 30, 2006 Author Share Posted March 30, 2006 EDIT:I have added a udf, TrayMenuEx to do this. Not a slick way, but sort of a solution in many cases.Yupp, Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling 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