Adams100 Posted May 26, 2014 Share Posted May 26, 2014 If I'm adding icons into an image list from .exe files, how can I check if a certain exe file is already in the list? Example: #include <GuiImageList.au3> Global $hImage = _GUIImageList_Create(16, 16, 5) _GUIImageList_AddIcon($hImage, "C:\path\to\somefile1.exe", 0) _GUIImageList_AddIcon($hImage, "C:\path\to\somefile2.exe", 0) _GUIImageList_AddIcon($hImage, "C:\path\to\somefile3.exe", 0) _GUIImageList_AddIcon($hImage, "C:\path\to\somefile2.exe", 0) ; how to check if this icon is already in the ImageList instead of having it there twice? I'd like to be able to avoid adding icons to the list that have already been added to list. And possibly even tell me the index of the exisiting image in the ImageList. Link to comment Share on other sites More sharing options...
UEZ Posted May 26, 2014 Share Posted May 26, 2014 Write all your paths to an array, make the array unique and add those files to the image list. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Adams100 Posted May 27, 2014 Author Share Posted May 27, 2014 Yeah I thought it would have to be something like that. I'll just keep track of any paths I added to the imagelist by adding them to an array as well. Thanks. 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