오토핫키 gui 스킨 - otohaski gui seukin

오토핫키 gui 스킨 - otohaski gui seukin

36 - [오토핫키] GUI Show와 GuiClose

앞서 간소하게 계속 다뤘지만 정확한 사용법을 알고 가야 할 것 같네요.

GUI Show는 창을 보여주거나 창 크기를 복원, 활성화 하며, 타이틀 이름을 설정합니다.

문법

Gui, Show [, Options, Title]

설명

Show

GUI 창을 보여주고나 창 크기를 복원, 활성화 합니다.

Options

크기, 위치 활성화 유무 등을 설정

Wn : 창의 너비

Hn : 창의 높이

Xn : X축 위치

Yn : Y축 위치

Center : 창을 가운데 정렬

xCenter : 창을 수평 중앙 정렬

yCenter : 창을 수직 중앙 정렬

AutoSize : 콘트롤에 맞게 창 크기 변경

Minimize : 창을 최소화하고 그 아래 있는 창을 활성화

Maximize : 창을 최대화 하고 활성화

Restore : 창을 복구하고 활성화

NoActivate : 창을 복구하고 활성화하지 않음

NA : 창을 활성화 하지 않습니다.

Hide : 창을 감추고 그 아래 창을 활성화

Title

창의 제목. 생략할 경우 파일명이 사용 됩니다.

문법

설명

GuiClose:

창이 닫힐 때 실행됩니다. 이 라벨이 없다면 창이 닫힐때 Hide 합니다.

예제

예제1)

Gui, Add, Text, x5 y5, 테스트

Gui, Show, x0 y0 w100 h200, 테스트

Return

GuiClose:

ExitApp

예제2)

Gui, Add, Text, x5 y5, 테스트

Gui, Show, w100 h200 Minimize, 최소화

Return

GuiClose:

MsgBox, 17, 종료, 정말 종료 합니까?

IfMsgBox, OK

ExitApp

이번 포스팅은 어려운 내용이 없으므로 예제 설명은 생략하겠습니다.

I've been able to partially reskin all windows system-wide using my Screen Dimmer app (its v2-only, but also compiled version is on GitHub in case you want to test out the skinning feature without installing AHK v2). If you use my app, look under background modes to change individual system elements partially, and use background themes to change system elements completely. My app only covers COLORS and not changing the windows to different styles like in the screenshots shown above.

Here is an excerpt of the background modes code in my app that might be useful to you:

Code: Select all

ChangeBackgroundMode(radio, *){

    static userBg := DllCall("user32\GetSysColor", "int", 1) ; Get user's desktop background color
    static backgroundModes := Map(
    "Normal"  , Map(0x000000, 0xC8C8C8, 1, userBg,   2, 0xD1B499, 3, 0xDBCDBF, 4, 0xF0F0F0, 5, 0xFFFFFF, 6, 0x646464, 7, 0x000000, 8, 0x000000, 9, 0x000000, 10, 0xB4B4B4, 11, 0xFCF7F4, 12, 0xABABAB, 13, 0xD77800, 14, 0xFFFFFF, 15, 0xF0F0F0, 16, 0xA0A0A0, 17, 0x6D6D6D, 18, 0x000000, 19, 0x000000, 20, 0xFFFFFF, 21, 0x696969, 22, 0xE3E3E3, 23, 0x000000, 24, 0xE1FFFF, 26, 0xCC6600, 27, 0xEAD1B9, 28, 0xF2E4D7, 29, 0xD77800, 30, 0xF0F0F0),
    "Morning" , Map(0x000000, 0xC7EDCC, 1, userBg,   2, 0xD1B499, 3, 0xC7EDCC, 4, 0xC7EDCC, 5, 0xC7EDCC, 6, 0x646464, 7, 0x000000, 8, 0x000000, 9, 0x000000, 10, 0xB4B4B4, 11, 0xFCF7F4, 12, 0xC7EDCC, 13, 0xD77800, 14, 0xFFFFFF, 15, 0xC7EDCC, 16, 0xA0A0A0, 17, 0x6D6D6D, 18, 0x000000, 19, 0x000000, 20, 0xFFFFFF, 21, 0x696969, 22, 0xE3E3E3, 23, 0x000000, 24, 0xE1FFFF, 26, 0xCC6600, 27, 0xEAD1B9, 28, 0xF2E4D7, 29, 0xD77800, 30, 0xF0F0F0),
    "Day"	  , Map(0x000000, 0xABABAB, 1, userBg,   2, 0xD1B499, 3, 0xABABAB, 4, 0xABABAB, 5, 0xABABAB, 6, 0x646464, 7, 0x000000, 8, 0x000000, 9, 0x000000, 10, 0xB4B4B4, 11, 0xFCF7F4, 12, 0xABABAB, 13, 0xD77800, 14, 0xFFFFFF, 15, 0xABABAB, 16, 0xA0A0A0, 17, 0x6D6D6D, 18, 0x000000, 19, 0x000000, 20, 0xFFFFFF, 21, 0x696969, 22, 0xE3E3E3, 23, 0x000000, 24, 0xE1FFFF, 26, 0xCC6600, 27, 0xEAD1B9, 28, 0xF2E4D7, 29, 0xD77800, 30, 0xF0F0F0),
    "Night"	  , Map(0x000000, 0x000000, 1, 0x000000, 2, 0x595757, 3, 0x595757, 4, 0x595757, 5, 0x595757, 6, 0x000000, 7, 0x000000, 8, 0xC6C8C5, 9, 0xC6C8C5, 10, 0x000000, 11, 0x000000, 12, 0x595757, 13, 0x5A5A57, 14, 0xC6C8C5, 15, 0x595757, 16, 0x000000, 17, 0x808080, 18, 0xC6C8C5, 19, 0xC6C8C5, 20, 0x5A5A57, 21, 0x000000, 22, 0x5A5A57, 23, 0xC6C8C5, 24, 0x000000, 26, 0xF0B000, 27, 0x000000, 28, 0x000000, 29, 0x5A5A57, 30, 0x000000),
    "Evening" , Map(0x000000, 0x000000, 1, 0x000000, 2, 0x222223, 3, 0x222223, 4, 0x222223, 5, 0x222223, 6, 0x000000, 7, 0x000000, 8, 0xC6C8C5, 9, 0xC6C8C5, 10, 0x000000, 11, 0x000000, 12, 0x222223, 13, 0x5A5A57, 14, 0xC6C8C5, 15, 0x222223, 16, 0x000000, 17, 0x808080, 18, 0xC6C8C5, 19, 0xC6C8C5, 20, 0x5A5A57, 21, 0x000000, 22, 0x5A5A57, 23, 0xC6C8C5, 24, 0x000000, 26, 0xF0B000, 27, 0x000000, 28, 0x000000, 29, 0x5A5A57, 30, 0x000000),
    "Midnight", Map(0x000000, 0x000000, 1, 0x000000, 2, 0xC6C8C5, 3, 0x000000, 4, 0x000000, 5, 0x000000, 6, 0x000000, 7, 0x000000, 8, 0xC6C8C5, 9, 0xC6C8C5, 10, 0x000000, 11, 0x000000, 12, 0x000000, 13, 0x5A5A57, 14, 0xC6C8C5, 15, 0x000000, 16, 0x000000, 17, 0x808080, 18, 0xC6C8C5, 19, 0xC6C8C5, 20, 0x000000, 21, 0x000000, 22, 0x000000, 23, 0xC6C8C5, 24, 0x000000, 26, 0xF0B000, 27, 0x000000, 28, 0x000000, 29, 0x5A5A57, 30, 0x000000),
    "Twilight", Map(0x000000, 0x000000, 1, 0x000000, 2, 0x8C3230, 3, 0x000000, 4, 0x000000, 5, 0x000000, 6, 0x000000, 7, 0x000000, 8, 0x8C3230, 9, 0xC6C8C5, 10, 0x000000, 11, 0x000000, 12, 0x000000, 13, 0x080816, 14, 0xC04B48, 15, 0x000000, 16, 0x000000, 17, 0x808080, 18, 0x8C3230, 19, 0x8C3230, 20, 0x000000, 21, 0x000000, 22, 0x000000, 23, 0x8C3230, 24, 0x000000, 26, 0xC04B48, 27, 0x000000, 28, 0x000000, 29, 0x5A5A57, 30, 0x000000))

    for displayElement, color in backgroundModes[radio.Name]
        try DllCall("user32\SetSysColors", "Int", 1, "IntP", displayElement, "UIntP", color)
}

the app uses a radio control to activate each mode, but i'm sure you can take what you need.

As you may notice, you dont require any dependencies (DLLs or 3rd party software) for this - just support for the WIN APIs. There are ways to reskin like how you are showing above without downloading other DLLs or 3rd party software, but I wasn't able to figure it out since it appeared to be a very complicated process.

For the themes aspect, I hardcoded .theme files to be high-contrast themes in order for it to allow complete color reskinning - additionally it allows the background mode changes to go from partially skinning to complete skinning. Feel free to reach out with questions. On a side note, I'll be releasing a new version of my app later this month with a better UI if you like its features.

Cheers.