이 스크립트 (Rob van der Woude의 수정본)는 XP 32 비트에서 제대로 작동하지만 7 64 비트의 경우 Set objDialog = CreateObject("UserAccounts.CommonDialog")
에서 실패합니다. 그 오류와 비슷한 것 (네덜란드어 번역) ActiveX cannot create the object "UserAccounts.CommonDialog"
. Windows 7과 호환되도록이 작업을 수행해야하는 다른 방법이 있습니까?VBS 스크립트는 XP 32 비트에서 작동하지만 7 64 비트에서는 작동하지 않습니다.
MsgBox("Your input avi MUST be 60fps, or this script will not work."),0,"IMPORTANT!"
MsgBox("Please select the location of your AVI."),0,"AVI location"
WScript.Echo GetFileName("", "AVI files (*.avi)|*.avi")
Function GetFileName(myDir, myFilter)
Dim objDialog
Set objDialog = CreateObject("UserAccounts.CommonDialog")
If myDir = "" Then
objDialog.InitialDir = CreateObject("WScript.Shell").SpecialFolders("MyDocuments")
Else
objDialog.InitialDir = myDir
End If
If myFilter = "" Then
objDialog.Filter = "All files|*.*"
Else
objDialog.Filter = myFilter
End If
If objDialog.ShowOpen Then
GetFileName = objDialog.FileName
Else
GetFileName = ""
End If
End Function
CreateObject 오류에 대한 오류 코드가 있습니까? –
[VBScript에서 다른 이름으로 저장 대화 상자를 사용하려면 어떻게합니까?] (http://stackoverflow.com/questions/4386124/how-can-i-use-the-common-save-as-dialog-from) -vbscript) – techie007