Jump to content

Recommended Posts

Posted

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.

Posted

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...