|
ronriel
|
 |
« on: May 11, 2007, 08:11:48 AM » |
|
I have my little sister using my computer so i make some of my files/folders hidden. But when i need to access those files/folders then i will have to go to "folder options" to show those hidden files. Of course i will have to set the computer again not to show those hidden files after I'm finished using them. It's a tedious and repetitive task. What i want is a little utility to make Hiding/showing those hidden files easy like a click on an icon or a press on a hotkey. Thanks..
|
|
|
|
|
Logged
|
|
|
|
|
Cpilot
|
 |
« Reply #1 on: May 11, 2007, 09:00:53 AM » |
|
Here's a quick script written in FBSL. It's only been tested on WinXP. Simply click the icon to toggle between visible and not visible. If you have an explorer window open you'll need to refresh it to see the changes.
|
|
|
|
Logged
|
|
|
|
|
lanux128
|
 |
« Reply #2 on: May 11, 2007, 01:03:16 PM » |
|
another way is to get a good file manager as that will allow you view hidden files/folders, then you can let your sister use the computer as it is - with your files/folders hidden.. 
|
|
|
|
|
Logged
|
|
|
|
|
|
mouser
|
 |
« Reply #3 on: May 11, 2007, 02:56:57 PM » |
|
cpilot, nice, that could come in handy to add to a toolbar 
|
|
|
|
|
Logged
|
|
|
|
|
Cpilot
|
 |
« Reply #4 on: May 11, 2007, 03:19:47 PM » |
|
cpilot, nice, that could come in handy to add to a toolbar  Thanks. Yeah it could, I threw it up there quick though to give him what he wanted. 
|
|
|
|
|
Logged
|
|
|
|
|
ronriel
|
 |
« Reply #5 on: May 13, 2007, 06:50:22 AM » |
|
Thank you Cpilot. That is EXACTLY what i want  ... and that was quite a quick response! I'm sorry for my late reply though. Thanks again man. 
|
|
|
|
|
Logged
|
|
|
|
|
Cpilot
|
 |
« Reply #6 on: May 13, 2007, 03:23:36 PM » |
|
Thank you Cpilot. That is EXACTLY what i want  ... and that was quite a quick response! I'm sorry for my late reply though. Thanks again man.  No problem, just glad I could help.
|
|
|
|
|
Logged
|
|
|
|
|
aCkRiTe
|
 |
« Reply #7 on: May 17, 2007, 10:04:01 AM » |
|
Here is a way to do it with AHK. It uses the hotkey (WinKey + H). It also refreshes the window as well... [ copy or print] #SingleInstance Force #Persistent #NoEnv SetBatchLines, -1 #h:: CheckActiveWindow: ID := WinExist("A") WinGetClass,Class, ahk_id %ID% WClasses := "CabinetWClass ExploreWClass" IfInString, WClasses, %Class% GoSub, Toggle_HiddenFiles_Display Return Toggle_HiddenFiles_Display: RootKey = HKEY_CURRENT_USER SubKey = Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced RegRead, HiddenFiles_Status, % RootKey, % SubKey, Hidden If HiddenFiles_Status = 2 RegWrite, REG_DWORD, % RootKey, % SubKey, Hidden, 1 Else RegWrite, REG_DWORD, % RootKey, % SubKey, Hidden, 2 PostMessage, 0x111, 28931,,, ahk_id %ID% Return You can downlaod here http://www.autohotkey.net...krite/Toggle%20Hidden.rarHTH...
|
|
|
|
« Last Edit: May 19, 2007, 05:29:17 PM by aCkRiTe »
|
Logged
|
|
|
|
|
ronriel
|
 |
« Reply #8 on: May 19, 2007, 05:17:08 AM » |
|
thanks aCkRiTe... refreshing the window is an extra mouse click. so thank you.. 
|
|
|
|
|
Logged
|
|
|
|
|
ronriel
|
 |
« Reply #9 on: May 19, 2007, 07:03:59 AM » |
|
aCkRiTe, have you used Autoit3? which do you think is more powerful? I have Autoit3 installed and so far am very happy with it. As soon as i knew which registry values to manipulate, I was able to implement this function on hotkeys... however, i was not able to get it to refresh the windows automatically. Well, i'm not very good at Autoit3 either b'coz i have only discovered it last week.
They say, both Autoit3 and Ahk have a common beginning, so which is better? Am i better off switching to AHK (i have used Autoit3 for a week anyway) or stick to autoit3?
I'm sorry if this is a little off topic...
|
|
|
|
|
Logged
|
|
|
|
|
aCkRiTe
|
 |
« Reply #10 on: May 19, 2007, 12:28:12 PM » |
|
Well I glad you like it and your welcome. I have never used Autoit3 so I dont know too much about it, though I hear they are similar. I dont know if Autoit3 is more or less powerful than AHK, but AHK can do A LOT in my opinion and the people over at the forum are finding that out more each day. I would highly recommand AutoHotKey! I picked it up about 10 months ago and it was so easy to learn. Only background I had in scripting was Windows Shell Scripting, but was able to pick AHK up quickly. They have great documentation and a great forum. Hope this information was some what helpful and some of it is just my opinion. BTW I just came across this forum the other day. I hope to be a little active over here, seems like a great forum!
|
|
|
|
|
Logged
|
|
|
|
|
|
|
AndyM
|
 |
« Reply #12 on: May 19, 2007, 04:38:27 PM » |
|
Here is a way to do it with AHK. It uses the hotkey (WinKey + H). It also refreshes the window as well...
[ copy or print] #SingleInstance Force #Persistent #NoEnv SetBatchLines, -1 Menu,Tray,Tip,ToggleHidden ; ANDY ADDED THIS LINE #h:: CheckActiveWindow: ID := WinExist("A") WinGetClass,Class, ahk_id %ID% WClasses := "CabinetWClass ExploreWClass" IfInString, WClasses, %Class% GoSub, Toggle_HiddenFiles_Display Return Toggle_HiddenFiles_Display: RootKey = HKEY_CURRENT_USER SubKey = Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced RegRead, HiddenFiles_Status, % RootKey, % SubKey, Hidden If HiddenFiles_Status = 2 RegWrite, REG_DWORD, % RootKey, % SubKey, Hidden, 1 Else RegWrite, REG_DWORD, % RootKey, % SubKey, Hidden, 2 PostMessage, 0x111, 28931,,, ahk_id %ID% Return[/size][/size][/size] You can downlaod here http://www.autohotkey.net...0Hide%20Files-Folders.zipHTH... This is really handy, and toggles hidden/unhidden and refreshes the folder instantly. The link is a stand-alone .exe file, but I just pasted the above code into ToggleHidden.ahk, and stuck a shortcut in my start-up folder. aCkRiTe, you should name this and put it over in "Finished Programs" so more people would notice it! (and send Donation Credits)
|
|
|
|
|
Logged
|
|
|
|
|
ronriel
|
 |
« Reply #13 on: June 25, 2007, 09:43:59 PM » |
|
I want the script to refresh/update the desktop and all existing windows as well so i don't have to manually refresh all the other windows and the desktop. So here's a script in Autoit3. It Refreshes all open windows including the desktop all at once like when you make changes under the view tab of the folder options. It shows system files as well. Just press winkey+h. Code: [ copy or print] Opt ("WinTitleMatchMode", 4) HotKeySet ("#h", "SH") Func SH() $key = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" $read = RegRead ($key, "Hidden") If $read = 1 Then RegWrite ($key, "Hidden", "REG_DWORD", "2") RegWrite ($key, "ShowSuperHidden", "REG_DWORD", "0") UpdateExplorer() Else RegWrite ($key, "Hidden", "REG_DWORD", "1") RegWrite ($key, "ShowSuperHidden", "REG_DWORD", "1") UpdateExplorer() EndIf EndFunc Func UpdateExplorer() $Win = WinList ("classname=CabinetWClass") If IsArray ($Win) Then For $i = 1 To $Win[0][0] DllCall ("user32.dll", "long", "SendMessage", "hwnd", $Win[$i][1], "int", 0x111, "int", 28931, "int", 0) Next EndIf DllCall ("user32.dll", "long", "SendMessage", "hwnd", WinGetHandle ("classname=Progman"), "int", 0x111, "int", 28931, "int", 0) EndFunc While 1 Sleep (10000) WEnd and the compiled script..
|
|
|
« Last Edit: August 23, 2007, 02:00:18 AM by ronriel »
|
Logged
|
|
|
|
|