Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to AutoHotKey to monitor constantly for a particular pop-up and run a script when that pop-up appears
    primarykey
    data
    text
    <p>We have an annoying pop up that occurs in our Point of Sale system, that always has the same Window Title and Window Message. I would like to create a script that monitors constantly for this window to pop up, and presses enter immediately when it does.</p> <p>I realize I could use a loop that runs a check for the window every 500ms and then executes the script if the window is present, but I'm thinking there must be SOME way where AHK can monitor continuously without being on a short timed loop. Any past experience is well appreciated! Thank you!</p> <p>P.S. I looked into the #persistent tag, but I don't think that really does what I'm looking for.</p> <p>Additional note: I continued my own line of research and found WinWait, but it's not working when the pop up box appears! Can you let me know what I'm doing wrong? Here's the script that I added to my AHK file:</p> <pre><code>WinWaitActive, Message, Number of Kits,0 { Send {Enter} } Return </code></pre> <p>And here is the capture from the Windows Inspector:</p> <pre><code>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;( Window Title &amp; Class )&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; Message ahk_class TMessForm &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;( Mouse Position )&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; On Screen: 1219, 438 (less often used) In Active Window: 765, 7 &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;( Now Under Mouse Cursor )&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; Color: 0xF7F3F7 (Blue=F7 Green=F3 Red=F7) &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;( Active Window Position )&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; left: 454 top: 431 width: 491 height: 148 &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;( Status Bar Text )&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;( Visible Window Text )&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; &amp;Ok 1 Number of Kits &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;( Hidden Window Text )&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; &gt;&gt;&gt;&gt;( TitleMatchMode=slow Visible Text )&lt;&lt;&lt;&lt; &gt;&gt;&gt;&gt;( TitleMatchMode=slow Hidden Text )&lt;&lt;&lt;&lt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload