Hola,
Me gustaría saber si es posible ejecutar el scrip solamente en una ventana específica y que no afecte a las otras.
Ejemplo : mando comandos en el navegador Chrome pero yo puedo usar normalmente Excel sin que reciba las pulsaciones que mande al navegador.
ES posible?
FUNCIONAR SOLO EN PROGRAMA ESPEFICO
Moderator: Flipeador
Re: FUNCIONAR SOLO EN PROGRAMA ESPEFICO
Sí, tendrías que usar la directiva #IfWinActive . Ejemplo de la documentación de AutoHotkey:
Code: Select all
#IfWinActive ahk_class Notepad
^!a::MsgBox You pressed Ctrl-Alt-A while Notepad is active. ; This hotkey will have no effect if pressed in other windows (and it will "pass through").
#c::MsgBox You pressed Win-C while Notepad is active.
::btw::This replacement text for "btw" will occur only in Notepad.
#IfWinActive
#c::MsgBox You pressed Win-C in a window other than Notepad.