AutoHotkey Community

It is currently May 27th, 2012, 5:10 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Explorer .. View mode
PostPosted: May 4th, 2010, 7:34 am 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
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...
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...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 4th, 2010, 12:12 pm 
thanks.
but who can find how to one key to show/hide the Navigation Pane or preview pane?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 11th, 2010, 2:21 pm 
Offline

Joined: May 11th, 2010, 2:17 pm
Posts: 1
In Windows 7, To show/hide the preview pane, hit (Alt+P) in the active window you wish to perform the action in.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 14th, 2010, 5:34 am 
Offline

Joined: September 20th, 2006, 2:05 pm
Posts: 73
<F5> to switch between views.
Replace with hotkey of your choice

cleaned up function:
Code:
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):
Code:
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 14th, 2010, 9:02 pm 
Offline

Joined: September 10th, 2009, 5:54 pm
Posts: 203
Anyone knows the code to view in large icons in 7?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 18th, 2012, 5:25 pm 
Like Gauss I seek the commands for the other listview modes in Windows 7, Large Icons and Extra Large Icons.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], Stigg and 11 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group