Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

SimulateKeyEvent

jc4golf
Posts: 32
Joined: Wed Jun 23, 2021 12:33 am

Re: SimulateKeyEvent

Post by jc4golf »

I think I've found a solution. Instead of sending individual keystrokes, I've found I can use the following javascript to enter a value into an input element:

Code: Select all

  TempJavaScript := 'document.execCommand("insertText", false, "jc4golf@outlook.com");';
There is a potential problem with this because document.execCommand() is deprecated, although it still works, and if it doesn't still work in the future I'll have to try something else.
Post Reply