Hallo ich verstehe noch nicht so viel von Autoit da wollte ich fragen wie kann ich bei ImagenSearch ein Ronadom Click machen auf das gesuchte bild.
Wer kann mir helfen?
Danke.
Mein code:
Code:
#include <ImageSearch.au3>
HotKeySet("{TAB}", "Inicio")
HotKeySet("{p}", "pausa")
$x1=0
$y1=0
Global $pausa
Func Inicio()
While True
If Not $pausa Then
$IMG1=_ImageSearch("IMG.png",1,$x1,$y1,60)
If $IMG1=1 Then
MouseClick("LEFT",$x1,$y1)
Sleep(2000)
EndIf
EndIf
WEnd
EndFunc
Func pausa()
If $pausa Then
$pausa = False
Else
$pausa = True
EndIf
EndFunc
While 1
Sleep(1)
WEnd
Wenn du dich in Englisch besser artikulieren kannst wird dir das niemand verwehren.
butter123, das muss nich auf 0 gesetzt werden, da ImageSearch eine 0 returned wenn nichts gefunden wird.
Immer diese Kleinscheißerei... Verstehen kann man es doch ohne Probleme, nur ob man die Frage richtig interpretiert ist wichtig. Das kann man auch bei vollständig korrekter Grammatik nicht immer.
Code:
#include <ImageSearch.au3>
HotKeySet("{p}", "_TogglePause")
Global Const $imageFile = @ScriptDir & "\IMG.png"
Global Const $imageWidth = 100, $imageHeight = 100
Global $paused, $x, $y
While Sleep(10)
If Not $paused Then
$returnValue = _ImageSearch($imageFile, 0, $x, $y, 60)
If $returnValue == 0 Then
MouseClick("primary", $x + Random(0, $imageWidth), $y + Random(0, $imageHeight))
Sleep(2000)
EndIf
EndIf
WEnd
Func _TogglePause()
$paused = Not $paused
EndFunc
Die Variablen $imageWidth und $imageHeight müssen natürlich noch auf die entsprechenden Werte des Bildes angepasst werden.
Immer diese Kleinscheißerei... Verstehen kann man es doch ohne Probleme, nur ob man die Frage richtig interpretiert ist wichtig. Das kann man auch bei vollständig korrekter Grammatik nicht immer.
Code:
#include <ImageSearch.au3>
HotKeySet("{p}", "_TogglePause")
Global Const $imageFile = @ScriptDir & "\IMG.png"
Global Const $imageWidth = 100, $imageHeight = 100
Global $paused, $x, $y
While Sleep(10)
If Not $paused Then
$returnValue = _ImageSearch($imageFile, 0, $x, $y, 60)
If $returnValue == 0 Then
MouseClick("primary", $x + Random(0, $imageWidth), $y + Random(0, $imageHeight))
Sleep(2000)
EndIf
EndIf
WEnd
Func _TogglePause()
$paused = Not $paused
EndFunc
Die Variablen $imageWidth und $imageHeight müssen natürlich noch auf die entsprechenden Werte des Bildes angepasst werden.
Vielen Vielen Dank, werde gleich mal alles ausprobieren
how to make random mouse click 06/28/2013 - AutoIt - 5 Replies well i have movable gui and i want to make random mouseclicks inside the gui
gui positions are $Bpos $Bpos $Bpos $Bpos.
and i want clicks to be made in lower right corner of the gui.
well that messed up my head lol
well here is the screen of this movable gui the area where random clicks should be made is painted black:
http://www.upload.ee/image/3407420/vajadus123.jpg
[PHP]Random Bild für Signatur 01/08/2013 - Web Development - 11 Replies Hallo :)
Daher mich die Größenbegrenzung bei .: UzziSoft :. stört, dacht ich mir, mach ich das selber.
Ein Bild Random anzuzeigen, kein Problem:
<?php
$file_array = array
('images/a.png',
'images/b.png',
'images/c.png');
$total = count($file_array);
$random = (mt_rand()%$total);
Facebook App random bild? Bei erfolgreicher hilfe 50 EGOLD 03/15/2012 - elite*gold Trading - 7 Replies Hi Leute,
ich mache seit heute verschiedene Facebook Apps, jedoch nur wo der Text anders ist. Jetzt will ich aber, das ein Random Bild erscheint.
Kann mir da jemand helfen? Danke!
Hier mal ein auszug aus der config php
$_CONFIG = './kberry.ttf';
$_CONFIG = 18;
$_CONFIG = -1; /* -1 für CENTER! */