Hide the AHK icon on InputBox dialogs
-
- Posts: 17
- Joined: 14 Feb 2016, 00:45
Hide the AHK icon on InputBox dialogs
I want to get user input without the user knowing that AHK is involved, for security reasons. Using InputBox, I can set the title to be innocuous but how do I get rid of or change the H icon? I have Resource Hacker, so maybe you can tell me what to change in that to get this effect. Thanks.
Last edited by HBinswanger on 04 Jul 2019, 17:52, edited 1 time in total.
Re: Hide the AHK icon on InputBox dialogs
Sounds odd and rather like a potential security risk/problem for the user than for you. What is the reason to hide AHK from the user?HBinswanger wrote: ↑04 Jul 2019, 17:39I want to get user input without the user knowing that AHK is involved, for security reasons.
Anyway, there is https://www.autohotkey.com/docs/commands/Menu.htm#NoIcon and https://www.autohotkey.com/docs/commands/_NoTrayIcon.htm
-
- Posts: 17
- Joined: 14 Feb 2016, 00:45
Re: Hide the AHK icon on InputBox dialogs
I'm using AHK to run a python script that will manufacture a password for me, and if someone gets my computer, figures out that the code is in AHK (which is dead easy to do, because the same H icon is in the tray--so he just needs to right-click and do "Edit this script") then he will have the key for ALL the passwords I will make using this script. Paranoid? A little.
-
- Posts: 17
- Joined: 14 Feb 2016, 00:45
Re: Hide the AHK icon on InputBox dialogs
Thanks for the NoIcon reference. Looks great, but I can't figure out how to use Menu to control InputBox. Is that possible? Or do I have to make a GUI control to get an input field that has no H icon?
Re: Hide the AHK icon on InputBox dialogs
I see. Like this?
https://www.autohotkey.com/docs/commands/Menu.htm#Icon:
Code: Select all
#NoTrayIcon ; hides tray icon
Menu, Tray, Icon, Shell32.dll, 174 ; also changes Inputbox icon
inputbox, var
Changing the tray icon also changes the icon displayed by InputBox, Progress, and subsequently-created GUI windows. Compiled scripts are also affected even if a custom icon was specified at the time of compiling.
-
- Posts: 17
- Joined: 14 Feb 2016, 00:45
Re: Hide the AHK icon on InputBox dialogs
Yes!!! That's it. Did you learn this from study of the Help file info? (It's usually excellent but in some cases, like NoIcon, it doesn't give examples).
- JoeWinograd
- Posts: 2214
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: Hide the AHK icon on InputBox dialogs
First, do this to remove the system tray icon:
Then this to put whatever icon you want on the InputBox:
Obviously, that won't affect the tray icon, because there is no tray icon. But InputBox will use it as its icon. Regards, Joe
Code: Select all
#NoTrayIcon
Code: Select all
Menu,Tray,Icon,c:\temp\MyIcon.ico ; make this icon location whatever you want
Re: Hide the AHK icon on InputBox dialogs
In this case I just looked it up, but probably there was something in the back of my mind that I rememberedDid you learn this from study of the Help file info?
But usually I don't care about icons. I rarely use any GUI...
- JoeWinograd
- Posts: 2214
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: Hide the AHK icon on InputBox dialogs
Ah, gregster got it...our posts crossed. Cheers, Joe