Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Explorer .. View mode


  • Please log in to reply
5 replies to this topic
a_h_k
  • Members
  • 685 posts
  • Last active: Sep 28 2015 12:32 AM
  • Joined: 02 Feb 2008
This scripts allows for much faster changing of "View" mode in Windows Explorer
It's faster than clicking "Views" button in the main toolbar
It's faster than using the menu-hotkeys way (eg alt-v .. h)

I created it due to a request here
________________________________
USAGE...

Thumbnails: Ctrl-1 or Ctrl-H or Ctrl-T

Tiles: Ctrl-2 or Ctrl-S

Icons: Ctrl-3 or Ctrl-N or Ctrl-I or Ctrl-M

List: Ctrl-4 or Ctrl-L

Details: Ctrl-5 or Ctrl-D
________________________________

The code...
#NoTrayIcon
#IfWinActive, ahk_class CabinetWClass

^1::
^h::
^t::
  WinGet, Win_pid, PID, A
  PostMessage, 0x111, 28717,0,, ahk_pid %Win_pid%      ;"Thumbnails" (h) (t)
Return

^2::
^s::
  WinGet, Win_pid, PID, A
  PostMessage, 0x111, 28718,0,, ahk_pid %Win_pid%      ;"Tiles" (s)
Return

^3::
^n::
^i::
^m::
  WinGet, Win_pid, PID, A
  PostMessage, 0x111, 28713,0,, ahk_pid %Win_pid%      ;"Icons" (n) (i) (m = Medium icon view)
Return

^4::
^l::
  WinGet, Win_pid, PID, A
  PostMessage, 0x111, 28715,0,, ahk_pid %Win_pid%      ;"List" (l)
Return

^5::
^d::
  WinGet, Win_pid, PID, A
  PostMessage, 0x111, 28716,0,, ahk_pid %Win_pid%      ;"Details" (d)
Return

Any further suggestions are welcome...

  • Guests
  • Last active:
  • Joined: --
thanks.
but who can find how to one key to show/hide the Navigation Pane or preview pane?

K12
  • Members
  • 1 posts
  • Last active: May 11 2010 01:17 PM
  • Joined: 11 May 2010
In Windows 7, To show/hide the preview pane, hit (Alt+P) in the active window you wish to perform the action in.

..:: Free Radical ::..
  • Members
  • 74 posts
  • Last active: May 30 2015 12:13 PM
  • Joined: 20 Sep 2006
<F5> to switch between views.
Replace with hotkey of your choice

cleaned up function:
GroupAdd, Explorer, ahk_class CabinetWClass
GroupAdd, Explorer, ahk_class ExploreWClass

#IfWinActive, ahk_group Explorer
*F5::_VIEW(WinActive())
Return

_VIEW(hwnd) {
views=0x7029,0x702b,0x702c,0x702d,0x702e
StringSplit,view_,views,`,
static view
view++
If view > %view_0%
  view=1
SendMessage,0x111,% view_%view%,0,,ahk_id %hwnd%
}

alternate noisy version (can be applied to explorer list views):
GroupAdd, Explorer, ahk_class CabinetWClass
GroupAdd, Explorer, ahk_class ExploreWClass

#IfWinActive, ahk_group Explorer
*F5::Goto, CHANGE_VIEW
Return

CHANGE_VIEW:
MouseGetPos,x,y,winid,ctrlid,2
Sleep,0
WM_COMMAND=0x111
ODM_VIEW_ICONS =0x7029
ODM_VIEW_LIST  =0x702b
ODM_VIEW_DETAIL=0x702c
ODM_VIEW_THUMBS=0x702d
ODM_VIEW_TILES =0x702e
views=%ODM_VIEW_ICONS%,%ODM_VIEW_LIST%,%ODM_VIEW_DETAIL%,%ODM_VIEW_THUMBS%,%ODM_VIEW_TILES%
StringSplit,view_,views,`,
view+=1
If view>5
  view=1
changeview:=view_%view%
ControlGet,listview,Hwnd,,,ahk_id %ctrlid%
parent:=listview
Loop
{
  parent:=DllCall("GetParent","UInt",parent)
  If parent=0
    Break
  SendMessage,%WM_COMMAND%,%changeview%,0,,ahk_id %parent%
}
return


Gauss
  • Members
  • 203 posts
  • Last active: Jan 27 2012 12:49 PM
  • Joined: 10 Sep 2009
Anyone knows the code to view in large icons in 7?

boli
  • Guests
  • Last active:
  • Joined: --
Like Gauss I seek the commands for the other listview modes in Windows 7, Large Icons and Extra Large Icons.