Jump to content

working with combobox

Go to solution Solved by Gianni,

Recommended Posts

I'm not able to get this to work: I'm getting error stating "ImageSearch() called with wrong number of args". On Line:

$result = _Imagesearcharea("cpu.bmp",1,0,0,@DesktopWidth,@DesktopHeight,$x1,$y1,100)

When I tried that code alone; it works fine. Just not with the combobox.

HotKeySet("{ESC}", "Quit")

#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Include <ImageSearch.au3>

$Form1 = GUICreate("Example Program", 315, 149, 192, 114)
$combo_Selection = GUICtrlCreateCombo("", 24, 24, 241, 25)
GUICtrlSetOnEvent(-1, "Combo")
$label_RelatedInfo = GUICtrlCreateLabel("label_RelatedInfo", 24, 64, 87, 17)

Opt("GUIOnEventMode", 1)
GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate")
GUICtrlSetData($combo_Selection, "CPUSlot|MemorySlot|CMOSBattery","")
$x1 = 0
$y1 = 0

While 1

Func Combo()

Func CPUSlot()
$result = _Imagesearcharea("cpu.bmp",1,0,0,@DesktopWidth,@DesktopHeight,$x1,$y1,100)

if $result=1 Then
Edited by asianqueen

Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.")
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...