Guest User

Untitled

a guest
Feb 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  1. @echo off
  2. echo ThinTaskbar
  3. echo Please wait a few secconds...
  4. net stop "UxSms"
  5. net start "UxSms"
  6.  
  7. Sleep, 15000
  8. SendInput {LWin Down}r{LWin Up}
  9. IfWinExist, Run
  10. WinActivate
  11. Sleep, 500
  12. SendInput {Raw}RunDll32.exe shell32.dll,Options_RunDLL 1
  13. SendInput {Enter}
  14. WinWait, Taskbar and Start Menu Properties
  15. SendInput {Tab}{Space}{Enter}
  16. WinWaitClose
  17. Run C:Program Filescmd.lnk
  18. WinWait, Administrator: cmd ahk_class ConsoleWindowClass
  19. winwaitactive Administrator: cmd ahk_class ConsoleWindowClass
  20. ConsoleSend("net stop uxsms", "ahk_class ConsoleWindowClass")
  21. ConsoleSend("`r", "ahk_class ConsoleWindowClass")
  22. Sleep, 3000
  23. ConsoleSend("net start uxsms", "ahk_class ConsoleWindowClass")
  24. ConsoleSend("`r", "ahk_class ConsoleWindowClass")
  25. Sleep, 3000
  26. ConsoleSend("exit", "ahk_class ConsoleWindowClass")
  27. ConsoleSend("`r", "ahk_class ConsoleWindowClass")
  28. WinWaitClose
  29. SendInput {LWin Down}r{LWin Up}
  30. IfWinExist, Run
  31. WinActivate
  32. Sleep, 500
  33. SendInput {Raw}RunDll32.exe shell32.dll,Options_RunDLL 1
  34. SendInput {Enter}
  35. WinWait, Taskbar and Start Menu Properties
  36. SendInput {Tab}{Space}{Enter}
  37. Run outlook.exe
  38. ConsoleSend(text, WinTitle="", WinText="", ExcludeTitle="", ExcludeText="")
  39. {
  40. WinGet, pid, PID, %WinTitle%, %WinText%, %ExcludeTitle%, %ExcludeText%
  41. if !pid
  42. return false, ErrorLevel:="window"
  43. if !DllCall("AttachConsole", "uint", pid)
  44. return false, ErrorLevel:="AttachConsole"
  45. hConIn := DllCall("CreateFile", "str", "CONIN$", "uint", 0xC0000000
  46. , "uint", 0x3, "uint", 0, "uint", 0x3, "uint", 0, "uint", 0)
  47. if hConIn = -1
  48. return false, ErrorLevel:="CreateFile"
  49. VarSetCapacity(ir, 24, 0) ; ir := new INPUT_RECORD
  50. NumPut(1, ir, 0, "UShort") ; ir.EventType := KEY_EVENT
  51. NumPut(1, ir, 8, "UShort") ; ir.KeyEvent.wRepeatCount := 1
  52. Loop, Parse, text ; for each character in text
  53. {
  54. NumPut(Asc(A_LoopField), ir, 14, "UShort")
  55. NumPut(true, ir, 4, "Int") ; ir.KeyEvent.bKeyDown := true
  56. gosub ConsoleSendWrite
  57. NumPut(false, ir, 4, "Int") ; ir.KeyEvent.bKeyDown := false
  58. gosub ConsoleSendWrite
  59. Sleep, 10
  60. }
  61. gosub ConsoleSendCleanup
  62. return true
  63. ConsoleSendWrite:
  64. if ! DllCall("WriteConsoleInput", "uint", hconin, "uint", &ir, "uint", 1, "uint*", 0)
  65. {
  66. gosub ConsoleSendCleanup
  67. return false, ErrorLevel:="WriteConsoleInput"
  68. }
  69. return
  70. ConsoleSendCleanup:
  71. if (hConIn!="" && hConIn!=-1)
  72. DllCall("CloseHandle", "uint", hConIn)
  73. DllCall("FreeConsole")
  74. return
  75. }
  76.  
  77. ^+t::
  78. ; GinThinSideTaskbar
  79. ; by giny8i8
  80. ; v1p01 at 2014-06-21
  81. ; 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.
  82. ; Assumptions: The taskbar is not hidden when you run this code (UxSms restart thinners the taskbar only if the taskbar is hidden)
  83.  
  84. TaskbarToggler() ;Hide Taskbar
  85. Sleep 1000 ;Wait a little
  86. RunWait,sc stop "UxSms" ;Stop "Desktop Window Manager Session Manager Service" service.
  87. RunWait,sc start "UxSms" ;Start "Desktop Window Manager Session Manager Service" service.
  88. Sleep 1000 ;Wait a little
  89. TaskbarToggler() ;Show Taskbar again
  90.  
  91. TaskbarToggler()
  92. {
  93. Run % "RunDll32.exe shell32.dll,Options_RunDLL 1" ;Open "Taskbar and Start Menu Properties" window
  94. WinWait, Taskbar and Start Menu Properties ;Wait for the window to open
  95. SendInput {Tab}{Space}{Enter} ;Togle Taskbar hiding
  96. }
  97. return
Add Comment
Please, Sign In to add comment