Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Modal Child File Select UI freezes AHK


  • Please log in to reply
4 replies to this topic
stressbaby
  • Members
  • 153 posts
  • Last active: Aug 10 2015 09:41 PM
  • Joined: 17 Aug 2009
Coming from here but this is a new problem unrelated to my original post.

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")[24].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?

stressbaby
  • Members
  • 153 posts
  • Last active: Aug 10 2015 09:41 PM
  • Joined: 17 Aug 2009
I know it is bad form to bump a thread, but I'm completely stuck here. This file select window basically stops the AHK script.
If anyone even has an IDEAS, I would love to hear them.

stressbaby
  • Members
  • 153 posts
  • Last active: Aug 10 2015 09:41 PM
  • Joined: 17 Aug 2009

We were ultimately unable to solve this with AHK.

Our IT staff installed a PuTTY sftp program and the upload is accomplished efficiently with cmd.exe and a .bat file.

I'm just running the .bat file from the AHK.



nimda
  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010

For future reference, I'd recommend you ask for a limited FTP account. (Either that or they don't want you automating uploads... so don't :p)



Virtualwire
  • Members
  • 3 posts
  • Last active: Dec 07 2015 04:03 PM
  • Joined: 22 Jul 2015

I know this is an old post, but I am running into exactly the same problem on a different web page.

the child modal window pop up freezes the script.

it also stops any timers in that script from functioning until the pop up is closed.

 

the child window functions normally when using the Keyboard and mouse.

 

Currently I am using Keyboard/mouse commands to click the button on the page and using the same technique to interact with the pop up.

It works but is not very elegant and may not work on other machines depending on the monitor resolution.

 

any new ideas on this?