Reputation: 101
My child sometimes would play game, i want to control that,so i set AHK to detect game play , well , he is smart and know how to close it ,like below image , close the AHK icon:
i wonder is there any way to ban from closing AHK file ? or in another word, close it through a password,only i can know that password.
in one words,lock any modify to AHK program thoroughly.
i have come up with the idea to set a higher user to lock that close or change,but i think it may be fruitless
Thanks if you know how to lock that modify.
---------------BTW------------------
(i tried to code a C++ back-end exe file ,but he also know how to close it in the task manager.
i have also tried a back-end screenshot exe by python , but he also know how to close it.)
Upvotes: 0
Views: 108
Reputation: 837
Here's a solution using the Menu command to remove the default menu items.
password := "secret"
Menu, Tray, NoStandard
Menu, Tray, Add , Exit, MyExit
.
.
.
MyExit:
InputBox, password_input, Enter password, Enter password, HIDE
If (password_input == password)
{
ExitApp
}
else
{
Msgbox,% "Wrong password"
}
return
Upvotes: 2