Page 1 of 1

Is there a way to Disable right click or Hide script System Icon if the specific program is still running?

Posted: 08 Jul 2020, 10:43
by ulraf
Windows 10.

openFolder.exe (NOT AHK)
1st, I have created a program that opens a specific folder working directory. Username and password will prompt before you can open this directory.

Login.exe (AHK)
2nd, I created a script that will open the program(openfolder.exe) and auto input the Login details.

Is there a way to Disable right click or Hide script System Icon on Login.exe if the openfolder.exe program is still running?

*** My reason for this is my AHK (Login.exe) script also writes/logs for any changes made to this working directory while still active.

Thank you.

Re: Is there a way to Disable right click or Hide script System Icon if the specific program is still running?

Posted: 08 Jul 2020, 13:26
by Rohwedder
Hallo,
add this in Login.exe:

Code: Select all

Menu, Tray, NoIcon
Process, WaitClose, openFolder.exe
Menu, Tray, Icon

Re: Is there a way to Disable right click or Hide script System Icon if the specific program is still running?

Posted: 09 Jul 2020, 10:58
by ulraf
Rohwedder wrote:
08 Jul 2020, 13:26
Hallo,
add this in Login.exe:

Code: Select all

Menu, Tray, NoIcon
Process, WaitClose, openFolder.exe
Menu, Tray, Icon
Thank You!

Btw, can I disable the right click as well? I'm not really sure for now if Im going to pursue hiding of the script Icon since it is the easiest way to know if my script is running :D

Re: Is there a way to Disable right click or Hide script System Icon if the specific program is still running?

Posted: 10 Jul 2020, 02:21
by Rohwedder
Then:

Code: Select all

; Menu, Tray, NoIcon
Process, WaitClose, openFolder.exe
Menu, Tray, Icon
Hotkey, *RButton, Off
Return
*RButton::Return
To hide script System Icon activate Menu, Tray, NoIcon.

Re: Is there a way to Disable right click or Hide script System Icon if the specific program is still running?

Posted: 10 Jul 2020, 02:43
by BoBo
since it is the easiest way to know if my script is running
F1 & F12::MsgBox % "I'm still running Master!" :?:

Re: Is there a way to Disable right click or Hide script System Icon if the specific program is still running?

Posted: 11 Jul 2020, 12:28
by ulraf
Rohwedder wrote:
10 Jul 2020, 02:21
Then:

Code: Select all

; Menu, Tray, NoIcon
Process, WaitClose, openFolder.exe
Menu, Tray, Icon
Hotkey, *RButton, Off
Return
*RButton::Return
To hide script System Icon activate Menu, Tray, NoIcon.
I mean disable the right click of the running script icon that is found in the tray. Sorry for the confusion. Thanks