Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; <COMPILER: v1.1.34.04>
- #NoEnv
- #SingleInstance, Force
- SetBatchLines, -1
- ;#NoTrayIcon
- SetWorkingDir %A_ScriptDir%
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-
- ;Windows 7 view modes
- ;menu item ID, view mode, CurrentViewMode/IconSize
- ;28749 E&xtra large icons - 1 256
- ;28751 La&rge icons - 1 96
- ;28750 &Medium icons - 1 48
- ;28752 Small ico&ns - 2 16
- ;28753 &List - 3 16
- ;28747 &Details - 4 16
- ;28748 Tile&s - 6 16
- ;28754 Conten&t - 8 32
- q:: ;windows 7 - set view mode
- ControlGet, hCtl, Hwnd,, SHELLDLL_DefView1, A
- PostMessage, 0x111, 28747, 0,, % "ahk_id " hCtl ;View, Details
- ;PostMessage, 0x111, 28750, 0,, % "ahk_id " hCtl ;Medium icons - 1 48 Normal
- return
- w:: ;windows 7 - set view mode
- WinGet, hWnd, ID, A
- WinGetClass, vWinClass, % "ahk_id " hWnd
- if !(vWinClass = "CabinetWClass") && !(vWinClass = "ExploreWClass")
- return
- for oWin in ComObjCreate("Shell.Application").Windows
- {
- if (oWin.HWND = hWnd)
- {
- ;MsgBox, % oWin.Document.CurrentViewMode " "
- oWin.Document.IconSize
- oWin.Document.CurrentViewMode := 4 ;View, Details
- ;oWin.Document.CurrentViewMode := 3 ;View, List
- oWin.Document.IconSize := 16
- break
- }
- }
- oWin := ""
- Return
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #R::Reload ;<-- ~ Reload Script ~
- #S::Suspend ;<-- ~ Suspend Script ~
- #P::Pause ;<-- ~ Pause Script ~
- #M::WinMinimize, ;<-- ~ Minimize Script ~
- ESC::ExitApp ;<-- ~ Exit Script ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement