Fake TitleBars Made with GUI Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
mxgainzflex11

Fake TitleBars Made with GUI  Topic is solved

29 Aug 2018, 04:42

I want color coded title bars, which is not an option in Windows 10, so I want to make a series of up to 17 fake title bars GUIs ❪depending on how many programs are running, up to 17 fake title bars will be needed, because that's how many title bars I can fit on my screen without overlapping❫. I am having an issue getting the tester to appear where I want it to.

◉it should be located at x0 and span across the width of the screen
◉the y-coordinate should match the top-most coordinate of the window it is pretending to be
◉ it should be 1/17 the height of the screen ❪height of my title bars❫

Can anyone help me position this GUI ❪not sure where my syntax is wrong❫?

SingleInstance,Force
    WinGetPos , X_SciTEWindow, Y_SciTEWindow, Width_SciTEWindow, Height_SciTEWindow, ahk_class SciTEWindow ;I don't even need the X_SciTEWindow, because the bars will all be aligned at x0, but it's there...
    SysGet, aScreenHeight, 1
    bar_height := Round(aScreenHeight / 17)
    Gui, Color, aqua,FFB1B1
    Gui, Show, w%A_ScreenWidth% h%bar_height%, SomeStupidBar
    WinSet, Style,  -20xC40000
    Winmove, %SomeStupidBar%,  x0, y%Y_SciTEWindow%, w%A_ScreenWidth%, h%bar_height%
    MsgBox, Time to move the window to x0, y%Y_SciTEWindow%, w%A_ScreenWidth%, h%bar_height%
    Winmove, %SomeStupidBar%,  x0, y%Y_SciTEWindow%, w%A_ScreenWidth%, h%bar_height%
    return
    Esc::ExitApp
trust_me
Posts: 98
Joined: 29 Jul 2017, 10:46

Re: Fake TitleBars Made with GUI

29 Aug 2018, 10:10

There are three syntax errors in your winmove command.

Code: Select all

WinMove, WinTitle, WinText, X, Y [, Width, Height, ExcludeTitle, ExcludeText]
You forgot the WinText parameter (even it is empty) and x must be a variable or integer like %x% , %Y_SciTEWindow% or 0 and the title "SomeStupidBar" is literal in your example and not a variable.

Winmove, SomeStupidBar , , 0 , %Y_SciTEWindow% , %A_ScreenWidth% , %bar_height%

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: RussF and 377 guests