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
Comments
Post a Comment