Close Modal Window that opens

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
bivanchan
Posts: 29
Joined: 10 Feb 2022, 10:01

Close Modal Window that opens

Post by bivanchan » 03 Dec 2022, 12:17

I've read a lot about closing a normal window but can not figure out how to identify this pesky popup modal window. When it opens we just click a button, so was thinking I could have it running in the background.

Here is the HTML that opens.

Code: Select all

<div class="modal-3Fdwcnv error-modal-2xpbRoW warning-GKeuCDW"><div class="modal-content-3S9If4z"><div class="modal-body-1Ieama7 error-modal-body-3j70DEX"><div class="title-row-1KtVpQz"><div class="state-icon-wrapper-3ODakqJ"><div class="fancy-state-icon-1MLyEBm warning-icon-2YjarC4"><div class="triangle-3JD9yNm"></div><svg width="30" height="30" viewBox="6 7 18 16" class="icon"><path fill-rule="evenodd" d="M15.883 7.465c-.348-.62-1.418-.62-1.766 0l-8 14.24a.822.822 0 00.025.885c.181.285.506.41.858.41h16c.351 0 .677-.125.857-.41a.82.82 0 00.026-.885l-8-14.24zM15 21a1 1 0 100-2 1 1 0 000 2zm.748-3.893a.5.5 0 01-.5.5h-.487a.5.5 0 01-.5-.5L13.75 11.5a.5.5 0 01.5-.5h1.498a.5.5 0 01.5.5l-.5 5.607z"></path></svg></div></div><div class="title-text-3geYQRS">Print Warning</div><div class="close-button-wrapper-WsaLsh0"><button class="button-unstyled modal-close-button-qd1O0PG" tabindex="0" title="Close" type="button"><svg width="30" height="30" viewBox="11 11 8 8" class="icon"><path fill-rule="evenodd" d="M18.854 17.453L16.401 15l2.453-2.453a.494.494 0 000-.701l-.7-.701a.497.497 0 00-.702 0L15 13.598l-2.453-2.453a.496.496 0 00-.7 0l-.701.7a.494.494 0 000 .702L13.599 15l-2.453 2.453a.494.494 0 000 .701l.7.701a.496.496 0 00.701 0L15 16.402l2.452 2.453a.497.497 0 00.702 0l.7-.7a.494.494 0 000-.702"></path></svg></button></div></div><div class="message-3L5FLGH">The packing slip for this shipment has already been printed. Reprint anyway?</div></div><div class="modal-footer-WpFOJ-Y"><button class="button footer-button-vCmIooy " tabindex="0" type="button">Cancel</button><button class="button-primary-shipstation footer-button-vCmIooy " tabindex="0" type="button">Yes, Reprint</button></div></div></div>

Return to “Ask for Help (v1)”