I'm trying to automate the upload of a vaccination HL7 message to a state vaccine registry. I'm logged in just fine now, and the next web page requires you to select the file to upload. The text box control doesn't allow user input. It also doesn't respond to AHK ControlSetText or ie document.getElementBy....value:= commands. The only way to select a file is to click the Browse button. This opens a standard File Select dialog, in this case Choose File to Upload.
This is where I'm stuck.
Basically the AHK script freezes at this point. Additional commands are not executed. If I open the script to look at the most recent lines executed, the last line is the click of the Browse button:
ie.document.getElementsByTagName("Input").Click()If I put a Pause or Msgbox line just after the click of this Browse button, they will execute, but only AFTER I close the child File Select window. Obviously, commands related to this file select window have no effect at all, because they are executed only after the window is closed.
Interestingly, while I can open the AHK script to see the most recently executed lines (from the tray icon), this child File Select window prevents me from CLOSING this AHK window. I can't close this window until AFTER I close this modal child File Select window.
Why would this child window essentially disable or freeze AHK and how can I get around this issue?