ImageSearch will not work.

12/03/2010 21:13 jaws908#1
Whenever I try to start ImageSearch.au3 it pops up for about half a second then disappears. I try compiling it and it ends up in the same result. I have not altered the file in any way, this exact file has worked in the past [in fact, earlier today]. I have the ImageSearchDLL.dll in the same folder, everything is in order. I can't figure out what would be stopping it, any ideas? lol
12/03/2010 21:17 kotarou3#2
ImageSearch.au3 only provides an API... You'll need to create a script that includes ImageSearch and it's APIs
12/04/2010 04:59 jaws908#3
Ended up working around it... It just wasn't picking up images. But like I said, I worked around it :s Oh well.
12/05/2010 05:53 razer951#4
Sounds like you don't know what your doing...
12/05/2010 07:47 Snoweł#5
Quote:
Originally Posted by jaws908 View Post
Whenever I try to start ImageSearch.au3 it pops up for about half a second then disappears. I try compiling it and it ends up in the same result. I have not altered the file in any way, this exact file has worked in the past [in fact, earlier today]. I have the ImageSearchDLL.dll in the same folder, everything is in order. I can't figure out what would be stopping it, any ideas? lol
Like Kotarou said, ImageSearch.au3 only provides an API that allows for the detection of images on the screen. Although it is possible to build a bot inside of ImageSearch.au3 this is not correct usage, create a new .au3 file and add the following:
Code:
#include <ImageSearch.au3>
Global $Paused
HotKeySet("{Pause}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
While 1
Send ("{CTRLDOWN}")
		Sleep (500)
		MouseClick ("left")
		Sleep (500)
		MouseClick ("left")
		Sleep (500)
		MouseClick ("left")
		Sleep (500)
		Send ("{CTRLUP}")
		Sleep (5500)
Send("{LALT down}")
$x1=0
$y1=0
$result = _ImageSearch("Gold.jpg",1,$x1,$y1,97)
if $result=1 Then
	MouseMove($x1,$y1,3)
	MouseClick("left")
	Sleep(3000)
EndIf
$x2=0
$y2=0
$result2 = _ImageSearch("FomorScroll.jpg",1,$x2,$y2,97)
if $result2=1 Then
	MouseMove($x2,$y2,3)
	MouseClick("left")
	Sleep(1500)
	EndIf
WEnd
Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc
The above was my first bot, I could not post any other source since my new bots are Under-Ground.

Speaking of bot Source:
Quote:
Originally Posted by Dark - Sora
My software (including underground) may be posted on elitepvpers.com, I do not care and legal action will not take place. The Terms of Service has been since modified to allow ElitePvPers staff the right to sell and view the source code for all of my software as well.
12/10/2010 00:37 HeartPulse#6
Dark Sora, the bot indeed works but we attacks and kill the fox but ignore the gold.
12/14/2010 03:36 Snoweł#7
Quote:
Originally Posted by HeartPulse View Post
Dark - Sora, the bot indeed works but we attacks and kill the fox but ignore the gold.
For the bot to work you need to extract the attached files in the same folder as the bot.