Code Folding for VBScript

This forum should be used for all code folding problems, questions or suggestions. You can also use this forum to request folding support for a new language.
Post Reply
Chuck Gahr

Code Folding for VBScript

Post by Chuck Gahr »

It would be a real help to include the file extension *.wsc in addition to the standard *.vbs, in code folding, for Windows Script Host programs. The *.wsc applies to VBScript Com programs, which contain a little XML, but are mostly VBScript.
:D
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Hi Chuck,

The mapping of the .wsc file extension to VB Script has been implemented and the new xFolder.dll can be found here:

http://www.zeusedit.com/z300/xFolder.zip

To install this new dll backup the current dll and replace it with the one contained in the zip file.

To complete the install the .wsc file extension also need to be added to the VB Script document type.

Cheers Jussi
Guest

Post by Guest »

Hi Jussi,

The new xFolder.dll works fine. I had already added the wsc to the VBS doc Type. This is going to be a big convenience.

Thanks, Chuck Gahr :D :D
Chuck Gahr

Code Folding for VB Script

Post by Chuck Gahr »

Hi Jussi,

Have been using the VB Script code folding and find that fold beginning (+ or -) does not happen for Class, Select or With statements; however the End statements for those commands do get the fold ending (.). This results in code folding getting mixed up when these statements are present. Although I don't use Zeus for VB6 editing, I suspect that these same problems might exist for VB6 also (the Class statement is not used in VB6).

I have checked this out and I think I am correct about the VB Script. This feature is so useful that it would probably benefit quite a few users to fix it. Thanks much. :D
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Hi Chuck,

Thanks for the bug report. The problems you highlighted have been fixed in the latest xFolder.dll which can be found here:

http://www.zeusedit.com/z300/xFolder.zip

To install this new dll backup the current dll and replace it with the one contained in the zip file.

The following code was used to test the changes made:

Code: Select all

Class Customer
    With Workbooks("Book2")
        FName = .Path & "\code.txt"
        If Dir(FName) <> "" Then
            Kill FName
        End If
        For Each VBComp In .VBProject.VBComponents
            If VBComp.Type <> vbext_ct_Document Then
               Kill FName
            End If
        Next VBComp
    End With

    If test <> "" Then
        For i = 0 To flxGrid.Cols - 1
            Select Case VBComp.Type
                Case one
                Case two
                Case Else
            End Select
        Next i
        For Each one In ActiveWorkbook
            Select Case VBComp.Type
                Case one
                Case two
                Case Else
            End Select
        Next one
    End If
End Sub

Public Property Get NewEnum() As IUnknown
    Set NewEnum = mCol.[_NewEnum]
End Property
Cheers Jussi
Chuck Gahr

Code Folding

Post by Chuck Gahr »

Hi Jussi,

Well, thanks again! The new xFolder works fine. :D

Regards, Chuck Gahr
Post Reply