home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1999 October
/
PCWorld_1999-10_cd1.bin
/
Software
/
Vyzkuste
/
Tajne
/
tajne.exe
/
shell
/
folder.vbs
next >
Wrap
Text File
|
1999-02-12
|
1KB
|
56 lines
Set WSHShell = WScript.CreateObject("WScript.Shell")
set shell = wscript.CreateObject("Shell.Application")
Shell.MinimizeAll
Dim cFolder
rFolder = BrowseForFolder("Choose Left Panel folder to open:")
Dim dFolder
lFolder = BrowseForFolder("Choose Right Panel folder to open:")
shell.Open lFolder
shell.Open rFolder
wait(2)
Shell.TileVertically
WSHShell.popup "Restore Desktop"
Shell.UndoMinimizeAll 'Undoes tile only, folders remain
Function BrowseForFolder(strPrompt)
On Error Resume Next
Dim objShell, objFolder, intColonPos, objWshShell
Set objShell = WScript.CreateObject("Shell.Application")
Set objWshShell = CreateObject("WScript.Shell")
Set objFolder = objShell.BrowseForFolder(&H0&, strPrompt, &h1&)
BrowseForFolder = objFolder.ParentFolder.ParseName(objFolder.Title).Path
If Err.Number <> 0 Then
BrowseForFolder = Null
If objFolder.Title = "Desktop" Then
BrowseForFolder = objWshShell.SpecialFolders("Desktop")
End If
intColonPos = InStr(objFolder.Title, ":")
If intColonPos > 0 Then
BrowseForFolder = Mid(objFolder.Title, intColonPos - 1, 2) & "\"
End If
End If
End Function
Sub Wait(x)
dim Start, i
Start = cint(second(time))
i = 0
Do
i = i + 1
loop While cint(second(time)) < Start + cint(x)
End Sub