autohotkey hide logo

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
apoklyps3
Posts: 116
Joined: 13 Feb 2016, 13:20

autohotkey hide logo

23 Jul 2017, 12:42

any ideea if this is possible?
Let's say you have an app that displays a logo (ex Adwcleaner by Malwarebytes).
Any chance to use auto autohotkey to cover that logo portion of adwcleaner so no logo shows anymore? and also trail it to anywhere you move its main window to always hide it?
Thanks in advance.
apoklyps3
Posts: 116
Joined: 13 Feb 2016, 13:20

Re: autohotkey hide logo

24 Jul 2017, 01:17

basicaly I'm trying to "censor" an image (logo) of an app on the screen at all times.
It seems that "Image search" is going to help me to find that specific logo.
No ideea on how to make it so it get's covered by a blank png/jpg at all times.
Any clue if this is possible?
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: autohotkey hide logo

07 Jan 2018, 06:24

There are a million ImageSearch-scripts already available at the forum. Once you identified the position of the image you wanna cover, create a frameless gui that displays your 'magic hat'-image at the same position. Probably an even more sophisticated option: Gdip.ahk
Good luck
Guest

Re: autohotkey hide logo

07 Jan 2018, 06:51

I've had some success using "GuiControl, Move" - right click ahk tray icon, start window spy, see if the image has a class, if so you may be able to move it out of sight (position outside the Gui dimensions) - alternative: see if you can remove / replace it from the resource it using resourcehacker - the exe may refuse to start it it notices is has been modified.
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: autohotkey hide logo

07 Jan 2018, 06:55

Two options that come to mind are as described above, create a borderless window with the size of the censor area. You can then do the DllCall for SetParent so it automatically moves with the window.
What could work even better is Control,Hide,,% Controlname,% WindowName, if it is an entire control that you need hidden.

Both options can either be part of a script that also starts your application, or you could trigger it based on a RegisterShellHookWindow. So every time the target window is created, it will be censored.
apoklyps3
Posts: 116
Joined: 13 Feb 2016, 13:20

Re: autohotkey hide logo

06 Feb 2018, 08:50

Thank you @Nextron. Control hide does the trick one question tough . The app displays the logo for a split of a second before hiding it. Any chance I could bypass that?

my code:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

full_command_line := DllCall("GetCommandLine", "str")

if not (A_IsAdmin or RegExMatch(full_command_line, " /restart(?!\S)"))
{
    try
    {
        if A_IsCompiled
            Run *RunAs "%A_ScriptFullPath%" /restart
        else
            Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%"
    }
    ExitApp
}

Run, myapp.exe
Winwait, myapp
Control, Hide, , wxWindowNR1, myapp
Control, Hide, , SysLink1, myapp
Winactivate, myapp
WinSet, Style, -0xC00000, A
Return
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: autohotkey hide logo

06 Feb 2018, 09:11

That's probably partially to do with WinWait which sleeps between checks. Two things you could try:
• Use Run with the Hide parameter, and after you hide the control, you use WinShow.
• Instead of WinWait, use something line While !WinExist("myapp") with a Sleep -1 on the next line. Perhaps that introduces less of delay.
apoklyps3
Posts: 116
Joined: 13 Feb 2016, 13:20

Re: autohotkey hide logo

06 Feb 2018, 09:50

now the application remains hidden at all times.
Not sure where to put which of the commands provided by you so that it will work

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ShatterCoder and 233 guests