Page 1 of 1

How to send a keystroke to the Internet Explorer window/tab my AHK script created

Posted: 23 Jan 2019, 13:17
by Steve06
Hello dear AHK community,
In my AHK code, I create a IE instance / window / tab with the following code:

Code: Select all

wb := ComObjCreate("InternetExplorer.Application")
wb.visible := true
wb.Navigate("https://www.mywebsite.com")
I'd like to use ControlSend to occassionally send a certain keystroke to that same IE tab, even if focus is lost and another IE tab becomes the active one.

For this, how can I refer to the IE window I created above in the ControlSend command?


The syntax is
ControlSend , Control, Keys, WinTitle, WinText, ExcludeTitle, ExcludeText
but being a AHK newbie, I'm not sure what to enter for Control and the other parameters. I gather I would enter {Right}for "Keys" as I'd like to send a right arrow keystroke once.

Any help is appreciated.

Best wishes,
Steve