|
You last visited: Today at 04:25
Advertisement
Imagesearch wont work
Discussion on Imagesearch wont work within the AutoIt forum part of the Coders Den category.
04/30/2013, 20:44
|
#1
|
elite*gold: 0
Join Date: Dec 2010
Posts: 11
Received Thanks: 0
|
Imagesearch wont work
Hey guys I am very very new with AutoIt so I just wanted to ask why it doesnt press F2 when the Image was not found.
Here is my Script :
[ autoit ]
#include <ImageSearch.au3>
$X = 0
$Y = 0
Func Start()
$Search = _ImageSearch('CritDmg.bmp', 1, $x1, $y1, 0)
If $Search = 1 Then
MouseClick("left")
MouseClick("left")
Else
Send("{F2 down}")
Sleep(100)
Send("{F2 up}")
EndIf
EndFunc
|
|
|
04/30/2013, 22:04
|
#2
|
elite*gold: 0
Join Date: Apr 2013
Posts: 110
Received Thanks: 6
|
i think the problem is on "If $Search = 1 Then"
i think there it needs to be
"If IsArray($Search) = True Then"
"Then"
"MouseClick("left")
etc...
etc..
etc.
PS: Im learning 1week already autoit but i think i know a liddle bit already
|
|
|
05/01/2013, 00:02
|
#3
|
elite*gold: 95
Join Date: May 2011
Posts: 982
Received Thanks: 189
|
schould not be the problem.
is the image to small maybe sth else looks similar to it? let your mose move, to where he found it.
|
|
|
05/01/2013, 13:11
|
#4
|
elite*gold: 0
Join Date: Dec 2010
Posts: 11
Received Thanks: 0
|
Hey guys thanks for your help.
It didn't fixed my problem anyway.
Ive worked on the code now for a couple hours everything works how i wanted.
BUT the script doesnt find the image even thought it is there.
I want that if the script found the Image it pauses the script and double mouseclick.
Heres my new Script:
[*CODE]
#include <ImageSearch.au3>
GUICreate("Test" ,200,150 )
GUICtrlCreateLabel ("Versuche:", 1, 30, 50)
GUISetState (@SW_SHOW)
HotKeySet("{NUMPAD3}","starten")
HotKeySet("{NUMPAD6}","beenden")
HotKeySet("{NUMPAD5}","pause")
$x1 = 0
$y1 = 0
$Versuche = GUICtrlCreateLabel ("0", 50, 30, 50)
While 1
Sleep(1)
WEnd
$Search = _ImageSearch('CritDmg.bmp'), 1, $x1, $y1, 2)
Func starten()
While 1
Send("{F2 down}")
Sleep(700)
Send("{F2 up}")
GUICtrlSetData($Versuche, GUICtrlRead($Versuche) + 1)
WEnd
EndFunc
If $Search = True Then
MouseClick("left")
MouseClick("left")
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0, $counter, 1)
WEnd
ToolTip("")
EndIf
Func beenden()
Exit
EndFunc
[*/CODE]
|
|
|
05/01/2013, 13:26
|
#5
|
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
|
es könnte auch sein das er das bild nicht findet und packe bitte deinen code in
[*CODE]
[*/CODE]
|
|
|
05/01/2013, 13:37
|
#6
|
elite*gold: 0
Join Date: Dec 2010
Posts: 11
Received Thanks: 0
|
Quote:
Originally Posted by »FlutterShy™
es könnte auch sein das er das bild nicht findet und packe bitte deinen code in
[*CODE]
[*/CODE]
|
Das ist mein Momentanes Problem , wenn das bild auf dem Desktop angezeigt wird macht er kein Doppelklick, also bei
If $Search = True Then
....
....
Habe Windows 8 64 Bit falls das was zu sachen tut ...
|
|
|
05/01/2013, 16:46
|
#7
|
elite*gold: 0
Join Date: Apr 2013
Posts: 110
Received Thanks: 6
|
well other Idea.
hmm dont it need to be :
If IsArray($Search) = True Then
|
|
|
05/01/2013, 18:06
|
#8
|
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
|
Quote:
Originally Posted by DDHacker
Das ist mein Momentanes Problem , wenn das bild auf dem Desktop angezeigt wird macht er kein Doppelklick, also bei
If $Search = True Then
....
....
Habe Windows 8 64 Bit falls das was zu sachen tut ...
|
hab vergessen zu schreiben das du bei dem code das * wegmachen musst
Code:
#RequireAdmin
#include <ImageSearch.au3>
GUICreate("Test" ,200,150 )
GUICtrlCreateLabel ("Versuche:", 1, 30, 50)
GUISetState (@SW_SHOW)
HotKeySet("{NUMPAD3}","starten")
HotKeySet("{NUMPAD6}","beenden")
HotKeySet("{NUMPAD5}","pause")
$x1 = 0
$y1 = 0
$Versuche = GUICtrlCreateLabel ("0", 50, 30, 50)
While 1
Sleep(1)
WEnd
#region Wird nicht aufgerufen 2
$Search = _ImageSearch('CritDmg.bmp'), 1, $x1, $y1, 2)
#endregion Wird nicht aufgerufen 2
Func starten()
While 1
Send("{F2 down}")
Sleep(700)
Send("{F2 up}")
GUICtrlSetData($Versuche, GUICtrlRead($Versuche) + 1)
WEnd
EndFunc
#region Wird nicht aufgerufen 1
If $Search = True Then
MouseClick("left")
MouseClick("left")
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0, $counter, 1)
WEnd
ToolTip("")
EndIf
#endregion Wird nicht aufgerufen 1
Func beenden()
Exit
EndFunc
fällt dir da was auf ? habs alles sogar "markiert"
da sind auch noch mehr fehler im script schau dir das nochmal in scite an und benutz die hilfe und google mal imagesearch
|
|
|
 |
Similar Threads
|
ImageSearch will not work.
12/14/2010 - Mabinogi - 6 Replies
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 . 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
|
1.52 wont work for me!
12/02/2009 - Dekaron - 1 Replies
When i click on the dekaron it ask me for the short cut andd says it refers to dekaron.exe.ink and it says its missing.Does anyone know what i did wrong.Thank you for your time and responses. p.s. if you have a fix to this pls send it to me.:mofo:
|
my CE wont work?? help please :]
09/25/2009 - Dekaron Exploits, Hacks, Bots, Tools & Macros - 5 Replies
hey guys, i just downloaded Instantdeaths bypass ( it rocks <3 him ). then i open my CE and choose the process, keep address codes. Then i choose speed and skill hack then nuthing happens????? sorry im noooob any ideas are welcome. Also is there a new CE address table i need? if so could someone send me a download link.
Thanks for the help - James
|
SRO still wont work for me
05/28/2007 - Silkroad Online - 1 Replies
when i start SRO it shut down after 30secs.
i cant play this game now for a week.
plz help me. ill give + karma
|
All times are GMT +1. The time now is 04:25.
|
|