I am working on a script which uses Chrome a lot. I need to close tabs on a regular basis and sometimes there are webpages which use the Java Script "onunload" event, which opens a warnings message saying something like "Are you sure you want to leave this page? Yes/No" when attempting to close the tab via "send ^w".
Does anyone have a workaround for this. I would be even greatful if there was a way that AHK detects this event so I can handle it somehow.
My script has to rely on that the tab closes, otherwise it messes up completely.
Many thanks in advance and Regards!