autohotkey - Show the GUI every time the Notepad window is opened -


i trying create code, show foo window every time notepad opened. problem is, if close foo once, not shown again (when open notepad next time). using following code:

settitlematchmode, 2 winwaitactive, notepad gui, add, button, w200 h25 gtest1 , button 1 gui, add, button, w200 h25 gtest2 , button 2 gui, show,, foo return  test1: run test1.ahk return  test2: run test2.ahk return 

#persistent settimer, show_gui, 300 return  show_gui: ifwinnotexist, ahk_class notepad {     gui, destroy     return } ; otherwise: settimer, show_gui, off gui, add, button, w200 h25 gtest1 , button 1 gui, add, button, w200 h25 gtest2 , button 2 gui, show,, foo winwaitclose, ahk_class notepad settimer, show_gui, on return  test1: ; sth return  test2: ; sth return 

https://autohotkey.com/docs/commands/settimer.htm#examples


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -