Xichael Posted February 24, 2008 Share Posted February 24, 2008 (edited) In XP, this will toggle the visibility of hidden & system files with WIN+H (provided that you start out with those files hidden and don't manually switch their state while the script is running): expandcollapse popup#NoTrayIcon HotKeySet("#h", "ToggleHiddenFiles") Global $LastFileState = 0 While 1 Sleep(50) WEnd Func ToggleHiddenFiles() If $LastFileState = 0 Or $LastFileState = 1 Then ShowFiles() $LastFileState = 2 Else HideFiles() $LastFileState = 1 EndIf EndFunc Func ShowFiles() Run("control folders") WinWaitActive("Folder Options") Send("^{TAB}") Sleep(50) Send("{TAB}") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") Send("{SPACE}") Send("{DOWN}") Send("{DOWN}") Send("{SPACE}") WinWaitActive("Warning") Send("{LEFT}") Send("{ENTER}") WinWaitActive("Folder Options") Send("{TAB}") Send("{TAB}") Send("{ENTER}") EndFunc Func HideFiles() Run("control folders") WinWaitActive("Folder Options") Send("^{TAB}") Sleep(50) Send("{TAB}") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") Send("{SPACE}") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") Send("{SPACE}") Send("{TAB}") Send("{TAB}") Send("{ENTER}") EndFunc Edited February 28, 2008 by Xichael Link to comment Share on other sites More sharing options...
James Posted February 24, 2008 Share Posted February 24, 2008 Look into the key for setting this in the registry, Send isn't the best way of this. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now