George__ Posted February 29, 2016 Share Posted February 29, 2016 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 More sharing options...
InunoTaishou Posted February 29, 2016 Share Posted February 29, 2016 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 More sharing options...
George__ Posted February 29, 2016 Author Share Posted February 29, 2016 Is there a way i can include the $month without having to inter fear with the parameters? Link to comment Share on other sites More sharing options...
George__ Posted February 29, 2016 Author Share Posted February 29, 2016 I think I have a solution what I saw on a thread earlier which I can no longer find how can I keep what GUICtrlSetData(-1, "01|02|03|04|05|06|07|08|09|10|11|12", "01") Displays but change 01 for example to = images/month01.bmp Link to comment Share on other sites More sharing options...
InunoTaishou Posted February 29, 2016 Share Posted February 29, 2016 (edited) 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 February 29, 2016 by InunoTaishou Link to comment Share on other sites More sharing options...
George__ Posted March 1, 2016 Author Share Posted March 1, 2016 Thanks alot InunoTaishou 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