' Simulate Mouse Click in Window at Image position
' using Vbsedit's free Toolkit
Set toolkit = CreateObject("Vbsedit.Toolkit")
For Each window In toolkit.TopLevelWindows
If InStr(1,window.WindowTitle,"vbsedit",vbTextCompare)>0 Then
window.Screenshot "c:\temp\vbsedit.png"
Set image = CreateObject("Vbsedit.ImageProcessor")
image.Load "c:\temp\vbsedit.png"
Set position = image.FindImage("c:\temp\icon.png")
window.Click position.X, position.Y
WScript.Quit
End If
Next