SourceFormatX

軟體簡介

主要功能

為什麼要使用

源碼美化演示

整合和插件

界面預覽

常見問題

升級歷史

所獲獎項

用戶評價

許可協議

CodeToHtml

VBScript原始碼美化效果演示

現在購買
下載試用

程式碼美化工具功能

SourceFormatX 使用強大的VBScript詞法解析引擎全面地分析您的原始碼並根據用戶自定義的VBScript原始碼風格重構和美化VBScript和VBS原始碼檔案,因此它能精細地根據不同的原始碼風格美化多種原始碼,甚至是下面這些極度混亂的原始碼:

C/C++ Java C# Delphi (Pascal)
PHP JSP ASP JavaScript
Visual Basic VB.NET VBScript HTML Components
80x86 ASM 8051 ASM CORBA IDL


這是一個非常極端的 VBScript (VBS) 原始碼美化的範例,其目的是為了展示 SourceFormatX VBScript程式碼美化工具詞法解析引擎的威力。這份混亂到無法閱讀的 VBScript 原始碼檔案在1秒種內即可被 SourceFormatX 美化和縮排成整潔且可讀性強的美觀風格樣式。

  '----- 原始碼美化之前的VBScript原始碼 -----

  ON ERROR RESUME NEXT:Set fso = CreateObject("Scripting.FileSystemObject"):X=0:T=true:WhiLe T
  Input=Inputbox("Filename Lowercase Batch Convertor"&vbcrlf&vbcrlf& _
  "Please input the destination folder name. e.g. C:\Webmaster"&vbcrlf&vbcrlf& _
  "Note: Do NOT add '\' in the end of folder name!","FLowercase Convertor","C:\")
  iF Input="" then:Msgbox"Folder name is empty!",48,"Error!":T=true:else T=false:end If:wend
  Msgbox"All files names of "&Input&" will be converted to lowercase now...",64,"Note"
  fold(Input):Msgbox"Done! Total "&X&" file(s) were converted to lowercase.",64,"Done"
  sub fold(Path):SET f=fso.GetFolder(Path):Set rf = fso.GetFolder(Path).files:Set fc = f.SubFolders
  foR EACh fff in rf:lcf1=LCase(fso.GetAbsolutePathName(fff))
  fso.MoveFile fff, lcf1:X=X + 1:next:for EacH f1 in fc:fold(f1)
  Set file=fso.GetFolder(f1).files:fOR EACh ff iN file:lcf=LCase(fso.GetAbsolutePathName(ff))
  fso.MoveFile ff,lcf:NEXT:NEXT:END sub

  '----- 原始碼美化之後的VBScript原始碼 -----

  On Error Resume Next
  Set fso = CreateObject("Scripting.FileSystemObject")
  X = 0
  T = True

  While T
      Input = InputBox("Filename Lowercase Batch Convertor" & vbCrLf & vbCrLf & _
              "Please input the destination folder name. e.g. C:\Webmaster" & vbCrLf & vbCrLf & _
              "Note: Do NOT add '\' in the end of folder name!", "FLowercase Convertor", "C:\")

      If Input = "" Then
          MsgBox"Folder name is empty!", 48, "Error!"
          T = True
      Else T = False
      End If

  Wend

  MsgBox"All files names of " & Input & " will be converted to lowercase now...", 64, "Note"
  fold(Input)
  MsgBox"Done! Total " & X & " file(s) were converted to lowercase.", 64, "Done"

  '--------------------------------------------------------------------------

  Sub fold(Path)
      Set f = fso.GetFolder(Path)
      Set rf = fso.GetFolder(Path).Files
      Set fc = f.SubFolders

      For Each fff In rf
          lcf1 = LCase(fso.GetAbsolutePathName(fff))
          fso.MoveFile fff, lcf1
          X = X + 1
      Next

      For Each f1 In fc
          fold(f1)
          Set File = fso.GetFolder(f1).Files

          For Each ff In File
              lcf = LCase(fso.GetAbsolutePathName(ff))
              fso.MoveFile ff, lcf
          Next

      Next

  End Sub

  不要再浪費寶貴的時間手動整理美化VBScript語言原始碼了! 現在就下載SourceFormatX原始碼美化工具