Jump to content

GUICtrlGetImage... type... thing...


Recommended Posts

Firstly, sorry I've been posting so many questions lately, but I just got going on a program and can't stop (you know what that's like) and I was wondering if there's any way to tell what file a picture (or icon) control is displaying, right now I'm using an array, but I'm sure there's an easier way to do it.

Link to comment
Share on other sites

Firstly, sorry I've been posting so many questions lately, but I just got going on a program and can't stop (you know what that's like) and I was wondering if there's any way to tell what file a picture (or icon) control is displaying, right now I'm using an array, but I'm sure there's an easier way to do it.

Look at the UDF functions for the particular kind of control you are working with. For example, _GUICtrlButton_GetImage() if it's a Button. This returns a handle to the image used, which may be usable to get the actual file name, icon index, etc. -- I'm not sure.

:)

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

It's just a generic icon control, but I've made do with an array using $array[0] = control and $array[1] = "file location", I guess that's probably the simplest solution

Ah, you defined it in the first place and just need to keep track of it. An array is just the thing.

I had thought you needed to discover it from a third-party app's control.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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