Home News Examples Demo Downloads FAQ Documentation Mailing Lists License
Support GeSHi!
If you're using GeSHi, why not help GeSHi out? You can link to GeSHi with this image:
Powered by GeSHi
Get the HTML

Project Status
The latest stable version of GeSHi is, released on the 19th of Aug, 2012.

Supported Languages:
*Apache Log
*APT sources.list
*ASM (m68k)
*ASM (pic16)
*ASM (x86)
*ASM (z80)
*Backus-Naur form
*C for Macs
*C++ (with QT)
*Diff File Format
*DOT language
*FourJ's Genero
*INI (Config Files)
*Java 5
*KLone C & C++
*Objective C
*OpenOffice BASIC
*Oracle 8 & 11 SQL
*Pixel Bender
*Progress (OpenEdge ABL)
*Ruby on Rails
*Uno IDL
*VIM Script
*Visual BASIC
*Visual Fox Pro
*Visual Prolog
*Windows Registry Files

GeSHi is the current stable release, with eighteen new languages and bug fixes over the last release.

GeSHi 1.1.2alpha5 is the current latest version from the development branch, with full C support (see the GeSHi development website).
Mailing Lists
HomeNewsExamplesDemoDownloadsFAQDocumentationMailing ListsLicense 
11:54 pm GMT

GeSHi - Generic Syntax Highlighter


Latest News

News Archive

Random Screenshot

[small1.png: Click for a larger view]



Runtime Example

Sub MergeDocumentsInDirectory()

  Dim DestDirectory As String
  Dim FileName As String
  Dim SrcFile As String, DstFile As String
  Dim oDesktop, oDoc, oCursor, oText
  Dim argsInsert()
  Dim args()
  ' Remove the following comments to do things hidden
  ' dim args(0) as new
  ' args(0).name = "Hidden"
  ' args(0).value = true

  ' Which desitnation directory?
  DestDirectory = Trim( GetFolderName() )

  If DestDirectory = "" Then
    MsgBox "No directory selected, exiting",16,"Merging Documents"
    Exit Sub
  End If

  ' force a trailing backslash. This is okay because using URL notation
  If Right(DestDirectory,1) <> "/" Then
    DestDirectory = DestDirectory & "/"
  End If

  oDeskTop = CreateUnoService("")

  ' Read the first file!
  FileName = Dir(DestDirectory)
  DstFile = ConvertToURL(DestDirectory & "ResultatFusion.sxw")
  Do While FileName <> ""
    If lcase( right(FileName,3)) = "sxw" Then
      SrcFile = ConvertToURL(DestDirectory & FileName)
      If IsNull(oDoc) OR IsEmpty(oDoc) Then
        FileCopy( SrcFile, DstFile )
        oDoc = oDeskTop.Loadcomponentfromurl(DstFile, "_blank", 0, Args())
        oText = oDoc.getText
        oCursor = oText.createTextCursor()
        oCursor.BreakType =
        oCursor.insertDocumentFromUrl(SrcFile, argsInsert())
      End If
    End If
    FileName = dir()

  If IsNull(oDoc) OR IsEmpty(oDoc) Then
    MsgBox "No documents merged!",16,"Merging Documents"
    Exit Sub
  End If

  ' Save the document
  Dim args2()
  oDoc.StoreAsURL(DestDirectory & "ResultatFusion.sxw",args2())
  If HasUnoInterfaces(oDoc, "") Then
  End If

  ' Reload the document!
End Sub