(imagesearch) Alarma cuando no encuentre la imagen

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: (imagesearch) Alarma cuando no encuentre la imagen

Re: (imagesearch) Alarma cuando no encuentre la imagen

Post by A_AhkUser » 15 Oct 2017, 07:44

Hola,

Code: Select all

diezMinutosEnMs := 1*60*1000
return
^i::
inicio := A_TickCount
imagenEncontrada := true
while(imagenEncontrada and ((A_TickCount - inicio) < diezMinutosEnMs)) {
	ImageSearch, x, y, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, img.png
	SoundPlay % (imagenEncontrada:=(x <> "")) ? "Nonexistent.avi" : "tuSonido.wavOrMp3"
sleep, 500 ; te aconsejo colocar un sleep si quieres tratar con miramientos tu procesador
}
return

(imagesearch) Alarma cuando no encuentre la imagen

Post by WSWE » 15 Oct 2017, 03:14

Hola :wave: .
Quiero que este script busque por 10 minutos la imagen y si NO encuentra lo que busca me lo notifique con un sonido.
Gracias de antemano.

Code: Select all

^i::
	imageAppeared := false
	while(imageAppeared = false)
	{
		ImageSearch, Foundx, Foundy, 0, 0, A_screenwidth, A_screenheight, img.png
		x := foundx
		y := foundy
		if(x <> "")
		{
			imageAppeared := true
	}
	MsgBox, Imagen encontrada

return

Top