首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

替VC++6.0 添加批量注释和批量取消注释 vcscript脚本

2012-11-10 
为VC++6.0 添加批量注释和批量取消注释 vcscript脚本------------------------------------------FILE D

为VC++6.0 添加批量注释和批量取消注释 vcscript脚本


替VC++6.0 添加批量注释和批量取消注释 vcscript脚本

替VC++6.0 添加批量注释和批量取消注释 vcscript脚本

替VC++6.0 添加批量注释和批量取消注释 vcscript脚本


'------------------------------------------'FILE DESCRIPTION: 为开发环境添加批量注释或取消注释'------------------------------------------Sub SetSelNote() 'Sun DESCRIPTION:过程SetSellNote用于将选中的文本转换为注释    dim CurWin    set CurWin = ActiveWindow    if CurWin.type<>"Text" Then        MsgBox "当前窗口不是代码窗口"    else        NoteType = "//"        BeginLine = ActiveDocument.selection.TopLine        EndLine = ActiveDocument.Selection.BottomLine        if EndLine < BeginLine Then            line = BeginLine            BeginLine = EndLine            EndLine = Line        else            for row = BeginLine To EndLine                ActiveDocument.Selection.GoToLine row                ActiveDocument.Selection.SelectLine                ActiveDocument.Selection = NoteType+ActiveDocument.Selection            Next        End if    End ifEnd SubSub CancelSelNote()    dim CurWin    set CurWin = ActiveWindow    if CurWin.type<>"Text" Then        MsgBox "当前窗口不是代码窗口"    else        BeginLine = ActiveDocument.Selection.TopLine        EndLine = ActiveDocument.Selection.BottomLine        if EndLine < BeginLine Then            Line = BeginLine            BeginLine = EndLine            EndLine = Line        else            for row = BeginLine To EndLine                ActiveDocument.Selection.GoToLine row                ActiveDocument.Selection.SelectLine                 SelBlock = ActiveDocument.Selection                Trim(SelBlock)                pos = instr(SelBlock, "//")                if pos <> 0 then                    RightBlock = Right(SelBlock, Len(SelBlock)-2)                    ActiveDocument.Selection = RightBlock                End if            Next        End if    End ifEnd Sub

VC++注释, VC++6.0批量注释, 批量添加注释, VC++注释vcscript脚本


1楼sj_cug5天前 16:47
看看,学习学习

热点排行