AHK no detecta ventana de ayuda

Esta sección es para preguntas sobre programación/scripting usando AutoHotkey.

Moderator: Flipeador

gchiham
Posts: 7
Joined: 07 Aug 2017, 04:30

AHK no detecta ventana de ayuda

21 Jan 2018, 02:57

Hola,

Mi script funcionaba muy bien. El daba si detectaba un ventana de error el daba click en el icono OK (Aceptar). Pero ahora ya no me funciona. Intente instalar windows y tambien usar otra maquina virtual y nada.

Code: Select all

CoordMode, Pixel, Window
	ImageSearch, FoundX, FoundY, 706, 339, 1044, 536, C:\MASS\aceptar.png  ;SEARCH OK
	CenterImgSrchCoords("C:\MASS\aceptar.png", FoundX, FoundY)   ;CLICK OK
	If ErrorLevel = 0
		{
		Click, %FoundX%, %FoundY% Left, 1  ; CLICK OK		
		}
Antes me funcionaba super bien, ahora ignora la ventana.
Estoy dispuesto a pagar sus servicios si me ayudan con esto (siempre y cuando este en mi presupuesto).
garry
Posts: 3760
Joined: 22 Dec 2013, 12:50

Re: AHK no detecta ventana de ayuda

01 Feb 2018, 03:03

exemplo com pesquisa de imagem

Code: Select all

;- example downloads 2 picture show in GUI and search them ( Button-F2 )
;- modified=20180201
;-----------------------------------------------------------------------
#warn
setworkingdir,%a_scriptdir%

pic1=https://autohotkey.com/boards/images/flags/spain.png
SplitPath,pic1, name1, dir1, ext, name_no_ext, drive
f1 =%a_scriptdir%\%name1%
urldownloadtofile,%pic1%,%f1%

pic2=https://autohotkey.com/boards/images/flags/portugalbrazil.png
SplitPath,pic2, name2, dir2, ext, name_no_ext, drive
f2 =%a_scriptdir%\%name2%
urldownloadtofile,%pic2%,%f2%

Gui,add,picture, gA1 x10  y10  ,%f1%
Gui,add,picture, gA2 x90  y10  ,%f2%
gui,show, x100 y10 h70 w300 ,Use F2 to search Picture
return
;-------------
guiclose:
exitapp
;-------------
a1:
msgbox, 262208, ,Clicked Picture %name1%,2
return
a2:
msgbox, 262208, ,Clicked Picture %name2%,2
return
;----------------------------------------------------------------------

$F2::
ImageSearch,xf,yf,0,0,%a_screenwidth%,%a_screenheight%, *TransBlack %f1%
picx=%name1%
gosub,errorx

ImageSearch,xf,yf,0,0,%a_screenwidth%,%a_screenheight%, *TransBlack %f2%
picx=%name2%
gosub,errorx
msgbox, 262208, ,FINISHED
return

errorx:
if errorlevel=1
  {
  msgbox, 262208, ,Error`nTry with next picture in 3 seconds,3
  return
  }
else if errorlevel=2
  {
  msgbox, 262208, ,Picture %picx% not found`nNow continue in 3 seconds with next-picture,3
  return
  }
MouseMove,%xf%,%yf%,
ToolTip,Here is the picture %picx%
sleep,2500
tooltip
MouseClick,left,%xf%,%yf%       ;- click on x-picture
sleep,1000
return
;====================== END script =================================


Return to “Pedir Ayuda”

Who is online

Users browsing this forum: No registered users and 9 guests