Help with AutoHotKey and chrome.ahk

Job ID: 33920344

Budget: $20 – $50 USD

I am new to Autohotkey and Chrome.ahk and I need help with the following script.
In short, I need the Autohotkey script to listen to a delayed JS command in order to Upload images onto a website via the “<input type="file">”.
The following AHK code I wrote trying to solve this problem.
My script works by first getting the console.log event that I am looking for.
Then clicking the input file field (page.Evaluate()) then catching the file opener event and loading the files with DOM.setFileInputFiles from chrome Devtools protocols.
My current Issue is that the script does not seem to work persistently. It is A) not “listening” for the console.log event (I need to start the script after the console log was fired) and B) when I refresh the page
This autohotkey script needs to be always listening because another Javascript application will be looping through and sending the console.log event to call my AHK script.
Please know the HTML and JS files are a mockup to emulate the problem that I am facing.
Please note: this Job requires the following to be
1. High level of English (you will be tested)
2. Need to explain your solution to me (be prepared for a lot of follow up questions)
3. skilled with Auto hot key and the Chrome.ahk library
4. skilled in Javascript
Thank you and have a nice day
Related categories: JavaScript Web Scraping AutoHotkey