completely remove the start-button and get the space under it

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
adamantine
Posts: 32
Joined: 01 Aug 2020, 00:58
Location: europe

completely remove the start-button and get the space under it

Post by adamantine » 18 Aug 2020, 05:05

i know just 1 really good and useful way to remove the start-button:
to have the great and stable 'StartKiller' utility (startkiller.com) as constantly running exe-file
in my case:
- 'mem usage' is 5140 k
- 'i/o write bytes' is always 232 (which is typical for more or less simple ahk-scripts or auto-it-scripts) (very seldom they write exactly 116 bytes, sometimes 232)

'StartKiller' completely removes the start-button and gives the space under it (so that a button of the first opened window occupied this space: as accurately/properly as possible)
but i think that there should be a way to get the same good-looking result via the ahk-code (there is an interest for such code)


1 less process (in the task manager) is always a good thing (if a user loses nothing)
but we still cannot substitute this utility with an ahk-code (which certainly may only be created by a very advanced and experienced ahk-user)

the 'StartKiller' does its main task simply and brilliantly:
the start-button literally vanishes from taskbar, making all other taskbar content just shift a little (and completely take the place which was occupied by the start-button)
as i know, not a single other program is capable of doing exactly this tidy and convenient change (both visually and functionally)
- visually: the taskbar simply gets a better appearance
- functionally: more space becomes available for really useful content like opened windows

so is it possible to create an ahk-code that could substitute the 'StartKiller'?

there is this example in the docs:
(i don't know if it could help but it is something at least)

Code: Select all

/*
  Example: Temporarily remove the active window from the taskbar by using COM.

  Methods in ITaskbarList's VTable:
    IUnknown:
      0 QueryInterface  -- use ComObjQuery instead
      1 AddRef          -- use ObjAddRef instead
      2 Release         -- use ObjRelease instead
    ITaskbarList:
      3 HrInit
      4 AddTab
      5 DeleteTab
      6 ActivateTab
      7 SetActiveAlt
*/
IID_ITaskbarList  := "{56FDF342-FD6D-11d0-958A-006097C9A090}"
CLSID_TaskbarList := "{56FDF344-FD6D-11d0-958A-006097C9A090}"

; Create the TaskbarList object and store its address in tbl.
tbl := ComObjCreate(CLSID_TaskbarList, IID_ITaskbarList)

activeHwnd := WinExist("A")

DllCall(vtable(tbl,3), "ptr", tbl)                     ; tbl.HrInit()
DllCall(vtable(tbl,5), "ptr", tbl, "ptr", activeHwnd)  ; tbl.DeleteTab(activeHwnd)
Sleep 3000
DllCall(vtable(tbl,4), "ptr", tbl, "ptr", activeHwnd)  ; tbl.AddTab(activeHwnd)

; Non-dispatch objects must always be manually freed.
ObjRelease(tbl)

vtable(ptr, n) {
    ; NumGet(ptr+0) returns the address of the object's virtual function
    ; table (vtable for short). The remainder of the expression retrieves
    ; the address of the nth function's address from the vtable.
    return NumGet(NumGet(ptr+0), n*A_PtrSize)
}
Spoiler

adamantine
Posts: 32
Joined: 01 Aug 2020, 00:58
Location: europe

Re: completely remove the start-button and get the space under it

Post by adamantine » 20 Aug 2020, 09:35

the 'StartKiller' utility only contains these files:
- StartKiller.exe - 90,5 KB (92 760 bytes)
- startkiller.ini - 38 bytes
- ashook.dll - 58,5 KB (59 992 bytes)

is it a good/safe idea to do this?:
1) unload the utility
2) regsvr32 ashook.dll
but i really suspect that it simply cannot be that easy

adamantine
Posts: 32
Joined: 01 Aug 2020, 00:58
Location: europe

Re: completely remove the start-button and get the space under it

Post by adamantine » 16 Sep 2022, 23:50

there is this example in the docs:
Temporarily remove the active window from the taskbar by using COM          ...   DllCall   ...
17 months have passed. please let me clarify again:
could this example be really useful in a serious attempt to completely remove the start-button? (and get the space under it)

OS is win-server-03, start-killer is running, the usual left vertical taskbar looks like this:
2021 12 02   03 52 29.png
2021 12 02 03 52 29.png (215.84 KiB) Viewed 2835 times
 
the taskbar's upper area (where the quadratic start-button used to be in the past) has an ideal appearance thanks to the start-killer utility
many years of searches have proved that not a single other program/utility/code/script can do it so accurately and reliably. but i want to be mistaken:
i would like to find out that ahk has a capability to achieve the same highest level

  
i still have to tolerate this 'StartKiller.exe' process (constantly running/visible in my task manager, taking some system resources, increasing the number of processes)
there's a deep suspicion that it may be substituted by an ahk-code. i ask you to help me with this ahk-code if you're skilled enough for such challenging task

is regsvr32 ashook.dll worth trying?

could a solution be found in a following direction?:
ahk -> DllCall -> ashook.dll
(   with a result like this:   1. the StartKiller.exe is not needed anymore for the start-button to disappear,   2. the ashook.dll stays in a file system, for example in d:\programs\   )

 
 
added later:
the portable 'dll export viewer' program (version 1.66) (2016) (nirsoft.net) displays the following info about the ashook.dll file:

- function name: DisableStartMenu, FindTaskBar, HookEnd, HookStart, IsStartMenuDisabled
- address: 0x100014f0, 0x10001390, 0x100016c0, 0x10001510, 0x10001500
- relative address: 0x000014f0, 0x00001390, 0x000016c0, 0x00001510, 0x00001500
- ordinal: 1 (0x1), 2 (0x2), 3 (0x3), 4 (0x4), 5 (0x5)
- type: Exported Function, Exported Function, Exported Function, Exported Function, Exported Function

adamantine
Posts: 32
Joined: 01 Aug 2020, 00:58
Location: europe

Re: completely remove the start-button and get the space under it

Post by adamantine » 10 Oct 2022, 02:35

while hopelessly waiting for a possible help concerning the above-mentioned problem with the start-button,
there are a few (more or less related) thoughts concerning the standard yellow tool-tips
        that unwantedly and unavoidably appear when hovering a task-bar button, or even just quickly moving the cursor above some task-bar button
        (no matter what i tried to do to make those tool-tips disappear for good)


yesterday - for the first time in many-many years - i managed to achieve a substantial progress - by creating this modest ahk-code:

Code: Select all

^+t::run "D:\Programs\NirCmd.exe" -load win settopmost class tooltips_class32 0
this very line may already help some of you, as it initially helped me a lot (but only partially):

it was not a complete solution - it's just a good partial work-around which seems to be really working
       (it also allows not to lose the functionality of tool-tips completely -
       there are a few ways to actually see the tool-tip: for instance, after a simple click on the task-bar's empty space)

the following line removes the change:

Code: Select all

^+r::run "D:\Programs\NirCmd.exe" -load win settopmost class tooltips_class32 1



i also tried many other NirCmd actions (related to its 'win' command). for example, the following ahk-code at least gives something intriguing:

Code: Select all

^+5::run "D:\Programs\NirCmd.exe" -load win trans class tooltips_class32 255
but it only removes thin black border in all tool-tips,
and does it in a partially unacceptable way - there are serious visual glitches in situations when the tool-tip is above a window of some program
(while there are no glitches when the tool-tip is above the desk-top)

the following line removes the change:

Code: Select all

^+6::run "D:\Programs\NirCmd.exe" -load win trans class tooltips_class32 0

 

but a few hours ago i tried this code:

Code: Select all

^+c::run "D:\Programs\NirCmd.exe" -load win close class tooltips_class32
and it completely solved this ugly perennial problem
(i'm continuing to test it, but it seems that everything is great - all task-bar's tool-tips are totally gone)
 
       if you want, you may search the net to find out that many people were desperately trying to get rid of this awful part of the task-bar,
       and some attempts began more than 15-17 years ago. examples:
microsoft-1
microsoft-2
reddit-1
reddit-2
howtogeek
superuser-1
superuser-2
autoit
technipages
 
  
i also have a question:
- is it ok to just move this 1 ahk-line   (containing the "win close class tooltips_class32")   to the 'auto-load' part of my huge ahk-script?
        (it's called 'My Window-Mover', and it's constantly running)

- if it's ok, then how should i modify this line? (because the    ^+c::    part cannot be used there)
       (and moreover, i don't want to press that combination) (i need this new absence of tool-tips to always be automatic)


the just mentioned huge ahk-script is among 4 exe-files that i have in my system's auto-load list.
to be precise, there's an   auto-load.vbs   which contains the following:
Spoiler


my point is:
if this gigantic problem (coercive appearance of tool-tips) (with all corresponding reg-edit's tweaks/tricks doing nothing) is seemingly solved
(in a brilliant and simple way),
then maybe something similar is also technically possible - when it comes to complete and tidy removal of another task-bar's part (the start-button)

adamantine
Posts: 32
Joined: 01 Aug 2020, 00:58
Location: europe

Re: completely remove the start-button and get the space under it

Post by adamantine » 18 Oct 2022, 09:10

i need this new absence of tool-tips to always be automatic
i solved this problem (without using my huge ahk-script) by adding the following 2 lines to the end of my    auto-load.vbs:

Code: Select all

WScript.Sleep(3000)
Shell.Run """D:\Programs\NirCmd.exe"" win close class tooltips_class32""", 0, True
 
 
i still try to get rid of the 'StartKiller' utility,
yesterday i managed to get some tiny success, but generally the problem completely stays as it was (i mean, i'm still obliged to use this utility)

the short description of this tiny success is:
- now i know a very simple way to completely remove the start-button (and simultaneously: completely disable its start-menu)
- but that's all (nothing more is achieved)
 
- which means that an empty place appears instead of the start-button
        (this place is identical to the taskbar zone that is present after taskbar-buttons:         this place even has the same context menu)

- the current aim/question is:    how to remove this (quite small) empty space?
        (its size is circa equal to the size of any taskbar button:
         see the screenshot, i have small square taskbar buttons,    because my taskbar is vertical)
 
 
 
these are the small ahk-codes/lines that were tried:

Code: Select all

^+1::run "D:\Programs\NirCmd.exe" -load win child class "Shell_TrayWnd" close class "button"

^+2::run "D:\Programs\NirCmd.exe" -load win child class "Shell_TrayWnd" move class "ToolbarWindow32" 0 -5 0 0
^+3::run "D:\Programs\NirCmd.exe" -load win child class "Shell_TrayWnd" move class "ToolbarWindow32" 0 5 0 0

^+4::run "D:\Programs\NirCmd.exe" -load win child class "Shell_TrayWnd" settopmost class "ToolbarWindow32" 1
^+5::run "D:\Programs\NirCmd.exe" -load win child class "Shell_TrayWnd" settopmost class "ToolbarWindow32" 0

^+6::run "D:\Programs\NirCmd.exe" -load win child class "Shell_TrayWnd" move class "button" 0 -5 0 0
^+7::run "D:\Programs\NirCmd.exe" -load win child class "Shell_TrayWnd" move class "button" 0 5 0 0
- the settopmost commands were not helpful (they do nothing noticeable)

- the close class "button" command works

- the move class "button" commands were not helpful:
                    in fact, they do move the start-button vertically,
                    but generally it brings nothing useful, because the space under the start-button is not available anyway:     
                    the taskbar-buttons simply appear "under" the start-button       (when i move them, using the   move class "ToolbarWindow32"   command)
                    which may be described as:   they gradually become invisible (when entering the zone where the start-button was present)

- the move class "ToolbarWindow32" commands work (they really work) (they are literally able to shift all taskbar buttons up/down)
but there is an additional problem here: a new vertical position (of all taskbar buttons) is lost     (for example, after i open some new window)


i suspect that solution may be found (it's probably somewhere near), so i ask you to try to write here any useful advices/thoughts
     (of course, if you have some substantial knowledge concerning all these things/aspects that are related to taskbar/start-button/taskbar-buttons)
     (please, don't let this topic die without a tiniest helpful response)

Immutabl3
Posts: 1
Joined: 30 Oct 2022, 17:52

Re: completely remove the start-button and get the space under it

Post by Immutabl3 » 03 Nov 2022, 12:34

Hi Adamantine, I'm the guy from the voidtools forum who wishes to help out.

I was hoping to have a call with you sometime so we could share screens and code but I can't send you a PM on either of these forums.
Would you be able to send me a PM with your details so we could connect over Teams/Discord/Zoom?
I'm based in the UK btw.

adamantine
Posts: 32
Joined: 01 Aug 2020, 00:58
Location: europe

Re: completely remove the start-button and get the space under it

Post by adamantine » 03 Nov 2022, 18:11

I'm the guy from the voidtools forum who wishes to help out
- yes, of course i remember you (these days i was waiting for your message here)
- thanks again (for your wish to help)        (as we see in practice, this is something rare, unfortunately)
but I can't send you a PM on either of these forums
that's strange, because i have the following:

Allow users to send you private messages: yes (in both forums)

View messages: Inbox ----------> Folder is 0% full (voidtools forum)
View messages: Inbox ----------> No messages (this ahk forum)

(i sent you a PM containing my e-mail address)
so we could connect over Teams/Discord/Zoom
sorry, i don't have any of these programs/possibilities

(instead i have a russian war/terror in my country, and in my city of kiev too,
trying to survive, trying to find (without success) a remote constant easy part-time job, with low or even very low salary,
trying to keep myself/nerves sane -
under our local awful circumstances,      including those terrible aspects that are related to electricity/water/prices for food...)

SaulHJL
Posts: 13
Joined: 12 Aug 2022, 00:57

Re: completely remove the start-button and get the space under it

Post by SaulHJL » 10 Nov 2022, 10:56

I'm sorry to hear this; many EU & other 'Western/Liberal Democracy's' are opening their arms.

I know a Russian guy who's left his homeland because it has lost its mind/way.
He & his partner now have work visa's in Norway(?), I think...

If you're not able to fight, or if you feel you can help better in another way(s);
Then perhaps the best thing to do, is trying to find some skilled sponsorship?
Then with a steady income, you can send $ back home to help family/friends/others!

If you'd like, I'll hook you up with this Russian guy? ...
He has some Ukr friends (who no longer speak to him), & can give you better advice than me.
I'm in Australia....


Last bumped by adamantine on 10 Nov 2022, 10:56.

Post Reply

Return to “Ask for Help (v1)”