Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- echo ThinTaskbar
- echo Please wait a few secconds...
- net stop "UxSms"
- net start "UxSms"
- Sleep, 15000
- SendInput {LWin Down}r{LWin Up}
- IfWinExist, Run
- WinActivate
- Sleep, 500
- SendInput {Raw}RunDll32.exe shell32.dll,Options_RunDLL 1
- SendInput {Enter}
- WinWait, Taskbar and Start Menu Properties
- SendInput {Tab}{Space}{Enter}
- WinWaitClose
- Run C:Program Filescmd.lnk
- WinWait, Administrator: cmd ahk_class ConsoleWindowClass
- winwaitactive Administrator: cmd ahk_class ConsoleWindowClass
- ConsoleSend("net stop uxsms", "ahk_class ConsoleWindowClass")
- ConsoleSend("`r", "ahk_class ConsoleWindowClass")
- Sleep, 3000
- ConsoleSend("net start uxsms", "ahk_class ConsoleWindowClass")
- ConsoleSend("`r", "ahk_class ConsoleWindowClass")
- Sleep, 3000
- ConsoleSend("exit", "ahk_class ConsoleWindowClass")
- ConsoleSend("`r", "ahk_class ConsoleWindowClass")
- WinWaitClose
- SendInput {LWin Down}r{LWin Up}
- IfWinExist, Run
- WinActivate
- Sleep, 500
- SendInput {Raw}RunDll32.exe shell32.dll,Options_RunDLL 1
- SendInput {Enter}
- WinWait, Taskbar and Start Menu Properties
- SendInput {Tab}{Space}{Enter}
- Run outlook.exe
- ConsoleSend(text, WinTitle="", WinText="", ExcludeTitle="", ExcludeText="")
- {
- WinGet, pid, PID, %WinTitle%, %WinText%, %ExcludeTitle%, %ExcludeText%
- if !pid
- return false, ErrorLevel:="window"
- if !DllCall("AttachConsole", "uint", pid)
- return false, ErrorLevel:="AttachConsole"
- hConIn := DllCall("CreateFile", "str", "CONIN$", "uint", 0xC0000000
- , "uint", 0x3, "uint", 0, "uint", 0x3, "uint", 0, "uint", 0)
- if hConIn = -1
- return false, ErrorLevel:="CreateFile"
- VarSetCapacity(ir, 24, 0) ; ir := new INPUT_RECORD
- NumPut(1, ir, 0, "UShort") ; ir.EventType := KEY_EVENT
- NumPut(1, ir, 8, "UShort") ; ir.KeyEvent.wRepeatCount := 1
- Loop, Parse, text ; for each character in text
- {
- NumPut(Asc(A_LoopField), ir, 14, "UShort")
- NumPut(true, ir, 4, "Int") ; ir.KeyEvent.bKeyDown := true
- gosub ConsoleSendWrite
- NumPut(false, ir, 4, "Int") ; ir.KeyEvent.bKeyDown := false
- gosub ConsoleSendWrite
- Sleep, 10
- }
- gosub ConsoleSendCleanup
- return true
- ConsoleSendWrite:
- if ! DllCall("WriteConsoleInput", "uint", hconin, "uint", &ir, "uint", 1, "uint*", 0)
- {
- gosub ConsoleSendCleanup
- return false, ErrorLevel:="WriteConsoleInput"
- }
- return
- ConsoleSendCleanup:
- if (hConIn!="" && hConIn!=-1)
- DllCall("CloseHandle", "uint", hConIn)
- DllCall("FreeConsole")
- return
- }
- ^+t::
- ; GinThinSideTaskbar
- ; by giny8i8
- ; v1p01 at 2014-06-21
- ; If you use the Windows 7 Taskbar on the side of your screen, with smal icons, this makes it look 1 icon thin instead of the default double size.
- ; Assumptions: The taskbar is not hidden when you run this code (UxSms restart thinners the taskbar only if the taskbar is hidden)
- TaskbarToggler() ;Hide Taskbar
- Sleep 1000 ;Wait a little
- RunWait,sc stop "UxSms" ;Stop "Desktop Window Manager Session Manager Service" service.
- RunWait,sc start "UxSms" ;Start "Desktop Window Manager Session Manager Service" service.
- Sleep 1000 ;Wait a little
- TaskbarToggler() ;Show Taskbar again
- TaskbarToggler()
- {
- Run % "RunDll32.exe shell32.dll,Options_RunDLL 1" ;Open "Taskbar and Start Menu Properties" window
- WinWait, Taskbar and Start Menu Properties ;Wait for the window to open
- SendInput {Tab}{Space}{Enter} ;Togle Taskbar hiding
- }
- return
Add Comment
Please, Sign In to add comment