Jump to content

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

Show/Hide Hidden files and folders


  • Please log in to reply
18 replies to this topic
rayneraingoaway
  • Guests
  • Last active:
  • Joined: --

Could you edit one of the scripts to refresh that way for me?


Replace the PostMessage line with

Send {AppsKey}e


Try this:
Replace PostMessage, 0x111, 41504,,, ahk_id %ID%
with PostMessage, 0x111, 28931,,, ahk_id %ID%
That works just fine for me. (WinXP SP2)

…ra¥ne…

SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005

PostMessage, 0x111, 28931,,, ahk_id %ID%
That works just fine for me. (WinXP SP2)


Thanks :D! It works perfectly for me in Windows 2000 SP4
kWo4Lk1.png

jps
  • Members
  • 279 posts
  • Last active: Sep 11 2011 07:26 PM
  • Joined: 02 Sep 2006
Sweet!! Thanks dude :D

MkFly
  • Members
  • 2 posts
  • Last active: Sep 26 2009 04:30 AM
  • Joined: 08 Aug 2009
Here's my take on this. I toggle the "super-hidden" files, since I have normal hidden files show by default. "Super-hidden" are files that have the System and Hidden attributes set. You can easily change this to just toggle "regular" hidden files.

I use a scancode because of the way I have a few other things set up. Long story short, it's for the Windows key on my keyboard. Feel free to change that for your use.

The main thing I didn't like about the solutions I see on here is that they only refresh the "active" window. Since Hidden and SuperHidden actually apply to all Explorer windows, I wanted them *all* to refresh when I toggled it. So it refreshes all of the specified classes (including the desktop), not just the active window ID.

You might have to adjust the second parameter of PostMessage for different Windows versions (41504 is working for me on Windows 7 x64).

; --- TOGGLE "SUPERHIDDEN" FILES ---
SC06E & H Up::
  WinGetClass, ActiveWindowClass, A
  WClasses := "Progman CabinetWClass ExploreWClass"
  IfNotInString, WClasses, %ActiveWindowClass%
    Return

  ROOTKEY := "HKEY_CURRENT_USER"
  SUBKEY  := "Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
  
  RegRead, ShowSuperHidden_Status, %ROOTKEY%, %SUBKEY%, ShowSuperHidden
  
  If ShowSuperHidden_Status = 0
    ShowSuperHidden_Status = 1
  Else
    ShowSuperHidden_Status = 0
    
  RegWrite, REG_DWORD, %ROOTKEY%, %SUBKEY%, ShowSuperHidden, %ShowSuperHidden_Status%

  Loop, Parse, WClasses, %A_Space%
    PostMessage, 0x111, 41504,,, ahk_class %A_LoopField%
Return