Jump to content
Sign in to follow this  
magician13134

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

Recommended Posts

magician13134

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.

Share this post


Link to post
Share on other sites
PsaltyDS

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

Share this post


Link to post
Share on other sites
magician13134

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

Share this post


Link to post
Share on other sites
PsaltyDS

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

Share this post


Link to post
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
Sign in to follow this  

×