Jump to content

GUI Input


George__
 Share

Recommended Posts

I have made a GUI where you can click from a drop-down menu 12 options (months). I want the option selected to look for a image using ImageSearch and I cant seem to find what is wrong this is what I have so far.

$month = GUICtrlCreateCombo("", 100, 72)
GUICtrlSetData(-1, "01|02|03|04|05|06|07|08|09|10|11|12", "01")

            $month = GUICtrlRead($month)

            Local $search = _ImageSearch('images/month', $month,'.bmp',0, $x, $y, 0)

I also have the basic GUI code just don't believe its relevant.

Thanks 

Link to comment
Share on other sites

I can't seem to find what's wrong with it either, I have no way to replicate the issue. The only thing I see wrong out of this so far is

$month = GUICtrlRead($month)

$month is no longer the control id for your combo box

Local $search = _ImageSearch('images/month', $month,'.bmp',0, $x, $y, 0)

'images/month' is argument one, $month is argument two, '.bmp' is argument 3, 0 is argument 4, $x is argument 5, $y is argument 6, and 0 is argument 7. I don't know how your _ImageSearch function looks and what the parameters are to use it.

Link to comment
Share on other sites

Local $image_search_result = _ImageSearch("images/month" & GUICtrlRead($month) & ".bmp, 0, $x, $y, 0)

Will do what you originally wanted.

GUICtrlsetData(-1, "images/month01.bmp|images/month02.bmp|images/month03.bmp|etc", "images/month01.bmp")

Will do what you want based on your last post.

Edited by InunoTaishou
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...