X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=sample%2Fsample.vbs;fp=sample%2Fsample.vbs;h=0000000000000000000000000000000000000000;hb=8cd319a3714156b275c5e3809401dfccfa472e29;hp=ccf04000fcd782ef5381c9e45604c56a9717a271;hpb=96594a1f7f4a7fcb1ef2b3641e65c63a0a98635c;p=vbslib%2Fmain.git diff --git a/sample/sample.vbs b/sample/sample.vbs deleted file mode 100644 index ccf0400..0000000 --- a/sample/sample.vbs +++ /dev/null @@ -1,36 +0,0 @@ -Option Explicit -'--- start of vbslib include ------------------------------------------------------ -Dim g_debug, g_vbslib_path, g_IncludeType, g_CommandPrompt, g_fs, g_sh -If IsEmpty( g_fs ) Then - '--- start of parameters for vbslib include ------------------------------- - g_debug = 0 - g_vbslib_path = "vbslib\vbs_inc.vbs" - g_IncludeType = "" - g_CommandPrompt = 2 - '--- end of parameters for vbslib include --------------------------------- - Dim g_f, g_include_path, i : Set g_fs = CreateObject( "Scripting.FileSystemObject" ) - If g_fs.FileExists("setting.vbs") Then Set g_f = g_fs.OpenTextFile( "setting.vbs" ): Execute g_f.ReadAll() - If not IsEmpty( WScript.Arguments.Named.Item("IncludeType") ) Then g_IncludeType = WScript.Arguments.Named.Item("IncludeType") - Set g_sh = WScript.CreateObject("WScript.Shell") : g_f = g_sh.CurrentDirectory - g_sh.CurrentDirectory = g_fs.GetParentFolderName( WScript.ScriptFullName ) - For i = 10 To 1 Step -1 : If g_fs.FileExists(g_vbslib_path) Then Exit For - g_vbslib_path = "..\" + g_vbslib_path : Next - If g_fs.FileExists(g_vbslib_path) Then g_vbslib_path = g_fs.GetAbsolutePathName( g_vbslib_path ) - g_sh.CurrentDirectory = g_f - If i=0 Then WScript.Echo "Not found " + g_fs.GetFileName( g_vbslib_path ) +vbCR+vbLF+ "Check g_vbslib_path in " + WScript.ScriptName + " or setting.vbs" : WScript.Quit 1 - Set g_f = g_fs.OpenTextFile( g_vbslib_path ): Execute g_f.ReadAll() : g_f = Empty - If ResumePush Then On Error Resume Next - main - ResumePop : On Error GoTo 0 -End If -'--- end of vbslib include -------------------------------------------------------- - - -'******************************************************************************** -' <<< [main] >>> -'******************************************************************************** -Sub main() - echo "Hello, vbslib!" -End Sub - -