Jump to content

Glass CMD for Windows Vista/Seven


komalo
 Share

Recommended Posts

  • Replies 100
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

I wonder what other applications this could be used on. None others really work.

Also, when you're running this code type "edit". Neat.

It's been a long time since I messed around with Linux in any serious way but I seem to remember a bunch of customized command shells in X window managers. Selectable fonts, background colors, menus with toolbars. What kind of cracks me up too is a lot of the Windows apps, skins and GUIs seem to be going for the "flat" look that was on X in the mid 90s. When X was flat Windows and OS/2 came out with these dialogs with double bevels on 'em to make 'em look really 3D. Guess it's like the length of women's skirts. If you wait awhile the fashion just comes back in style.

But I guess X must be more flexible since these sophisticated command shells were running on Pentium machines with less than a GB and didn't seem to slow things down 'cept perhaps on scrolling long lists, like if you did an 'ls' on a large directory of files.

Link to comment
Share on other sites

In English?

... please adjust code [sTOP]

... to include more SHELLS/APPS [sTOP]

... preffered with a menu or config file [sTOP]

.... in other words:have this tool apply to more and other then only cmd.exe [sTOP]

... would make this tool standard issue for many [sTOP]

... thx [sTOP]

:)

Link to comment
Share on other sites

... please adjust code [sTOP]

... to include more SHELLS/APPS [sTOP]

... preffered with a menu or config file [sTOP]

.... in other words:have this tool apply to more and other then only cmd.exe [sTOP]

... would make this tool standard issue for many [sTOP]

... thx [sTOP]

:)

ps sorry for the "tone" will try to edit it myself :)
Link to comment
Share on other sites

Funny thing is, that still wasn't English. What does "preffered" mean?

And I think I know what you mean. You want to be able to select applications to apply the effect to?

just a dyslectic typo...? ...[preferred dictionary lookup]

anyway, yes, would like to to beable to select the appliction you can apply the effect to. >_<

to make it more funny, was not aware when i replied, i could change it myself, or even what autoit was, but happy to find out the autoit power :( , so me trying to do it myself, altho not sure whats the best way is to store the settings , registry or config file. searching for examples atm.

Soul.

Link to comment
Share on other sites

just a dyslectic typo...? ...[preferred dictionary lookup]

anyway, yes, would like to to beable to select the appliction you can apply the effect to. >_<

to make it more funny, was not aware when i replied, i could change it myself, or even what autoit was, but happy to find out the autoit power :( , so me trying to do it myself, altho not sure whats the best way is to store the settings , registry or config file. searching for examples atm.

Soul.

Bit pointless really as not all applications have "qualified" controls (if you will).

They have be black background, white text type of thing. It doesn't really make it worthwhile.

Link to comment
Share on other sites

  • 2 weeks later...

There was a bug in the glass cmd program, when you minimize the cmd window, and restore, the color stays like when cmd is in the 'background.' I don't know if it happens all the time on every system, but it happened on both my Vista and Windows 7 installs, so I made a fixed version (I do not know autoit or windows' programming hardly at all, so I assume I made a correct program.) I also added Powershell to the programs that it enables blurred glass on, and it would be trivial to copy the if->then structure and make it work on other programs of this type, like bash I would guess. Though I tried it on notepad and it didn't work as expected, I guess because you can not change the notepad text color to white and the background to black, which seems to be required in cmd/powershell. I also changed it so the tray icon is removed. So here is my modification:

#include <Misc.au3>
#include <Process.au3>
#Include <WinAPI.au3>
Opt("TrayIconHide",1) 

Global Const $HSHELL_WINDOWCREATED = 1
Global Const $HSHELL_WINDOWACTIVATED = 4;
Global Const $HWND_MESSAGE  = -3
Global $bHook = 1

$hGui = GUICreate("", 10, 10, -1, 0,-1,-1,$HWND_MESSAGE)
GUIRegisterMsg(_WinAPI_RegisterWindowMessage("SHELLHOOK"), "HookProc")
ShellHookWindow($hGui, $bHook)
ClearMemory()
;$About = TrayCreateItem("About")
TrayCreateItem("")
;$Exit = TrayCreateItem("Exit")

While 1
    sleep(20000)
    ;Switch TrayGetMsg()
    ;   Case $About
    ;       MsgBox("","","Glass CMD for Windows Vista/Seven By Komalo - komalo.deviantart.com")
    ;   Case $Exit
    ;       Exit
    ;EndSwitch
WEnd

Func HookProc($hWnd, $Msg, $wParam, $lParam)
        If _ProcessGetName(WinGetProcess($lParam)) = "cmd.exe" Then 
            EnableBlurBehind($lParam)
            If @error Then MsgBox(16, "Glass CMD", "You are not running Vista!")
            ClearMemory()
        EndIf
        If _ProcessGetName(WinGetProcess($lParam)) = "powershell.exe" Then 
            EnableBlurBehind($lParam)
            If @error Then MsgBox(16, "Glass CMD", "You are not running Vista!")
            ClearMemory()
        EndIf
EndFunc

Func ShellHookWindow($hWnd, $bFlag)
    Local $sFunc = 'DeregisterShellHookWindow'
    If $bFlag Then $sFunc = 'RegisterShellHookWindow'
    Local $aRet = DllCall('user32.dll', 'int', $sFunc, 'hwnd', $hWnd)
    Return $aRet[0]
EndFunc

Func EnableBlurBehind($hWnd)
    Const $DWM_BB_ENABLE = 0x00000001
    $Struct = DllStructCreate("dword;int;ptr;int")
    DllStructSetData($Struct,1,$DWM_BB_ENABLE)
    DllStructSetData($Struct,2,"1")
    DllStructSetData($Struct,4,"1")
    DllCall("dwmapi.dll","int","DwmEnableBlurBehindWindow","hwnd",$hWnd,"ptr",DllStructGetPtr($Struct))
EndFunc

Func ClearMemory()
    Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1)
    Return $ai_Return[0]
EndFunc   ;==>_ReduceMemory

Func OnAutoItExit()
    If $hGui Then
        ShellHookWindow($hGui, 0)
    EndIf
EndFunc  ;==>OnAutoItExit
Link to comment
Share on other sites

I think I explained the reasoning of this before...

Ah, sorry, I missed that somehow.

Did you see the bug I mentioned though about the color being the 'background' color after minimize/restore? I'm curious if that's just an issue with my system...

And does my modification have any bad effects regarding cpu usage? I mean, the documentation I saw on MS' web site indicated that the function hookproc shouldn't be called that often, but I couldn't find the numerical codes to use to put in specific checks for other $hshell_ calls to figure out exactly which one needs to be handled in addition to what the original program checks. [although task manager indicated it uses 0 cpu ...]

Edited by JamesG76
Link to comment
Share on other sites

  • 4 weeks later...

Hi! I'm new in this forum. I want to made a aero glass cmd for my file CMD. First run aero glass cmd and after run install.cmd. Is possible?

Sorry but i dont know how to create a file au3. Can you help me? The file run after finish install windows 7 in windows msdos.

the install.cmd is this:

@echo off

color 0A

goto start

:START

echo.

echo Actualizando a Windows 7 build 7600.13699

echo ========================= (by Mayoral) ==

echo.

echo Actualizacion 1 de 8...

1.msu /quiet /norestart

cls

echo.

echo Actualizando a Windows 7 build 7600.13699

echo ========================= (by Mayoral) ==

echo.

echo Actualizacion 2 de 8...

2.msu /quiet /norestart

cls

echo.

echo Actualizando a Windows 7 build 7600.13699

echo ========================= (by Mayoral) ==

echo.

echo Actualizacion 3 de 8...

3.msu /quiet /norestart

cls

echo.

echo Actualizando a Windows 7 build 7600.13699

echo ========================= (by Mayoral) ==

echo.

echo Actualizacion 4 de 8...

4.msu /quiet /norestart

cls

echo.

echo Actualizando a Windows 7 build 7600.13699

echo ========================= (by Mayoral) ==

echo.

echo Actualizacion 5 de 8...

5.msu /quiet /norestart

cls

echo.

echo Actualizando a Windows 7 build 7600.13699

echo ========================= (by Mayoral) ==

echo.

echo Actualizacion 6 de 8...

6.msu /quiet /norestart

cls

echo.

echo Actualizando a Windows 7 build 7600.13699

echo ========================= (by Mayoral) ==

echo.

echo Actualizacion 7 de 8...

7.msu /quiet /norestart

cls

echo.

echo Actualizando a Windows 7 build 7600.13699

echo ========================= (by Mayoral) ==

echo.

echo Actualizacion 8 de 8...

8.msu /quiet /norestart

cls

echo.

echo Actualizacion completada!

echo.

EXIT

Thanks a lot. Sorry for my poor english.

Bye

Link to comment
Share on other sites

Hi! I'm new in this forum. I want to made a aero glass cmd for my file CMD. First run aero glass cmd and after run install.cmd. Is possible?

Sorry but i dont know how to create a file au3. Can you help me? The file run after finish install windows 7 in windows msdos.

the install.cmd is this:

[sNIP]

Thanks a lot. Sorry for my poor english.

Bye

No, not here. Check the General Help and Support forum.
Link to comment
Share on other sites

  • 2 months later...

Made a great all glass version of this...it extends the glass into the app with the margins set to -1, meaning no window borders!!!

Source and binaries for CMD and PowerShell versions attached.

does anyone tried this with windows powershell?

Yeah I have, although the background has to be black.

Glass CMD.exe

Glass PowerShell.exe

Glass CMD.au3

Glass PowerShell.au3

Edited by Vadersapien
Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor.
Link to comment
Share on other sites

  • 1 month later...

Some people wanted this to work on the windows program "notepad" - well, if you add notepad.exe to the list of files this runs on, it looks bad. Because the colors are not proper, however you can change the colors in Personalize->Windows colors->Advanced Appearance Settings (Windows 7). If you set item: Window - to black background and white foreground, notepad looks proper, unfortunately you change all the other colors in windows to white on black and it looks hideous. But I did find a good solution, I first tried "notepad++", which allows colors to be changed in the program, however the icons in the program look washed out (something about different icon types or was it api types?) Anyway, I found a program that works however, "notepad2" - you check for this program in glasscmd autoit script, and set the colors to white on black in the program and it looks right. You can get it here: http://www.flos-freeware.ch/notepad2.html

Here is the updated source of glasscmd.au3 that enables glass for cmd.exe, powershell.exe and notepad2.exe attached, along with the *64-bit* .exe.

What would be a nice addition, is if someone with more autoit skills than myself, could make the script read a list of filenames from a .txt or .ini file to apply glass to. Anyways, enjoy!

screenshot:

glass.au3

glass.exe

Edited by JamesG76
Link to comment
Share on other sites

  • 4 months later...

I got this from deviantart ages ago, I love it!

I happen to see it on au3.

I haven't looked at the code yet but I might try adding an option to the tray icon for a slider.

If possible it would be nice to be able to adjust the hue of the effect.

With some wallpapers it can be hard to read at times.

But thanks alot looks great :idea:

-Kenny

 "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Link to comment
Share on other sites

  • 2 years later...

Does anyone know why only in the last two builds, there is no transparency at all in the cmd or notepad2.exe windows. Also, the original script will have this weird visual distortion on all four borders. This happened immediately after I tried to change the general Windows 7 transparency tint color.

Maybe I broke something in Windows? Maybe someone can tell whats wrong by looking at the problem below; and, offer a fix?

Posted Image

Some people wanted this to work on the windows program "notepad" - well, if you add notepad.exe to the list of files this runs on, it looks bad. Because the colors are not proper, however you can change the colors in Personalize->Windows colors->Advanced Appearance Settings (Windows 7). If you set item: Window - to black background and white foreground, notepad looks proper, unfortunately you change all the other colors in windows to white on black and it looks hideous. But I did find a good solution, I first tried "notepad++", which allows colors to be changed in the program, however the icons in the program look washed out (something about different icon types or was it api types?) Anyway, I found a program that works however, "notepad2" - you check for this program in glasscmd autoit script, and set the colors to white on black in the program and it looks right. You can get it here: http://www.flos-freeware.ch/notepad2.html

Here is the updated source of glasscmd.au3 that enables glass for cmd.exe, powershell.exe and notepad2.exe attached, along with the *64-bit* .exe.

What would be a nice addition, is if someone with more autoit skills than myself, could make the script read a list of filenames from a .txt or .ini file to apply glass to. Anyways, enjoy!

screenshot: http://img691.imageshack.us/img691/9906/glasson.jpg

Some people wanted this to work on the windows program "notepad" - well, if you add notepad.exe to the list of files this runs on, it looks bad. Because the colors are not proper, however you can change the colors in Personalize->Windows colors->Advanced Appearance Settings (Windows 7). If you set item: Window - to black background and white foreground, notepad looks proper, unfortunately you change all the other colors in windows to white on black and it looks hideous. But I did find a good solution, I first tried "notepad++", which allows colors to be changed in the program, however the icons in the program look washed out (something about different icon types or was it api types?) Anyway, I found a program that works however, "notepad2" - you check for this program in glasscmd autoit script, and set the colors to white on black in the program and it looks right. You can get it here: http://www.flos-freeware.ch/notepad2.html

Here is the updated source of glasscmd.au3 that enables glass for cmd.exe, powershell.exe and notepad2.exe attached, along with the *64-bit* .exe.

What would be a nice addition, is if someone with more autoit skills than myself, could make the script read a list of filenames from a .txt or .ini file to apply glass to. Anyways, enjoy!

screenshot: http://img691.imageshack.us/img691/9906/glasson.jpg

Edited by MKANET
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...