Post by Flipeador » 29 Mar 2018, 11:36
No me queda claro algunas cosas.
se elimina dando enter varias veces al mensaje de excell
¿Por qué se elimina dando varias veces
Enter y no solo una? ¿Puedes reproducir el error ahora y subir una imagen?
¿Siempre es
http://www.google.com?
Si ejecutas este Script, ¿hace algo cuando aparece el mensaje?
Code: Select all
#Persistent
hWinEventHook := DllCall("User32.dll\SetWinEventHook", "UInt", 0x8000, "UInt", 0x8000, "Ptr", 0, "Ptr", RegisterCallback("WinEventProc"), "UInt", 0, "UInt", 0, "UInt", 0, "Ptr")
Return
WinEventProc(hWinEventHook, Event, Hwnd, ObjId, ChildId, Thread, Time)
{
ParentId := DllCall("User32.dll\GetParent", "Ptr", Hwnd, "Ptr")
WinGetClass, classn, ahk_id %ParentId%
WinGet, procn, ProcessName, ahk_id %ParentId%
If (classn = "#32770" && procn = "excel.exe")
{
ControlGetText txt, Edit1, ahk_id %ParentId%
;ToolTip % txt "|" InStr(txt, "https://www.google.com")
If (InStr(txt, "www.google.com"))
{
WinWait ahk_id %ParentId%
SendInput {esc}
}
}
}
Edito* Prueba de nuevo el script, he corregido una cosita
No me queda claro algunas cosas.
[quote]se elimina dando enter varias veces al mensaje de excell[/quote]
¿Por qué se elimina dando varias veces [i]Enter[/i] y no solo una? ¿Puedes reproducir el error ahora y subir una imagen?
[quote]No se puede abrir http://www.google.com. No se puede descargar la información solicitada.[/quote]
¿Siempre es [c]http://www.google.com[/c]?
Si ejecutas este Script, ¿hace algo cuando aparece el mensaje?
[code=autohotkey file=Untitled.ahk]#Persistent
hWinEventHook := DllCall("User32.dll\SetWinEventHook", "UInt", 0x8000, "UInt", 0x8000, "Ptr", 0, "Ptr", RegisterCallback("WinEventProc"), "UInt", 0, "UInt", 0, "UInt", 0, "Ptr")
Return
WinEventProc(hWinEventHook, Event, Hwnd, ObjId, ChildId, Thread, Time)
{
ParentId := DllCall("User32.dll\GetParent", "Ptr", Hwnd, "Ptr")
WinGetClass, classn, ahk_id %ParentId%
WinGet, procn, ProcessName, ahk_id %ParentId%
If (classn = "#32770" && procn = "excel.exe")
{
ControlGetText txt, Edit1, ahk_id %ParentId%
;ToolTip % txt "|" InStr(txt, "https://www.google.com")
If (InStr(txt, "www.google.com"))
{
WinWait ahk_id %ParentId%
SendInput {esc}
}
}
}[/code]
[color=#FF0000]Edito*[/color] Prueba de nuevo el script, he corregido una cosita