開いているフォルダの自動整列を切り換える。
ToggleAutoArrange.vbs
Const FWF_AUTOARRANGE=&H00000001
For Each ie In CreateObject("Shell.Application").Windows()
If InStr(LCase(ie.FullName),"\explorer.exe") Then
ie.Document.FolderFlags=CLng(ie.Document.FolderFlags) Xor FWF_AUTOARRANGE
End If
Next
OnAutoArrange.vbs
Const FWF_AUTOARRANGE=&H00000001
For Each ie In CreateObject("Shell.Application").Windows()
If InStr(LCase(ie.FullName),"\explorer.exe") Then
ie.Document.FolderFlags=CLng(ie.Document.FolderFlags) Or FWF_AUTOARRANGE
End If
Next
OffAutoArrange.vbs
Const FWF_AUTOARRANGE=&H00000001
For Each ie In CreateObject("Shell.Application").Windows()
If InStr(LCase(ie.FullName),"\explorer.exe") Then
ie.Document.FolderFlags=CLng(ie.Document.FolderFlags) And Not FWF_AUTOARRANGE
End If
Next