maqleod 1 Posted August 29, 2011 (edited) What I want to do is detect a stream of letters and replace with a different string of letters. Something like this, but this detects the f and starts going, also pulling the f from the sent key and continually repeating forever: #include <Process.au3> HotKeySet("forumsX", "LinkForums") ;listens for forumsX to be typed While 1 ;loop indefinitely Sleep(100) ;keeps from maxing out processor WEnd Func LinkForums() Dim $pid If WinExists("Gmail", "") Then ;check if a window relating to Gmail is open $pid = WinGetProcess("Gmail", "") ;check that window is actually open in a browser (therefore negating notepad, wordpad, etc) If _ProcessGetName($pid) = "firefox.exe" Then ;verify browser is firefox Send("<a href='www.myforums.com'>My Forums</a>") ;replacement text goes here EndIf EndIf EndFunc Is the only way to do this to have a sequence of _IsPressed() functions in a large set of nested If statements? or is there a cleaner way using Hotkey set or IsPressed, or even something else? Edited August 29, 2011 by maqleod [u]You can download my projects at:[/u] Pulsar Software Share this post Link to post Share on other sites
smashly 12 Posted August 29, 2011 Hi,Have a look at the example in AutoIt help file -> User Defined Functions Reference -> WinAPI Management ->_WinAPI_SetWindowsHookEx.That should give you all the help you'll need to accomplish what your after. Cheers Share this post Link to post Share on other sites
monoscout999 10 Posted August 30, 2011 Maybe thisFollow the Link -------- Share this post Link to post Share on other sites