WBStudio.Block.Comment.Uncomment
; Copy this code into the file "WSP-USER.MNU".

_Block C&omment
    If !wGetSelState () Then Return
    strCmt = ";   "
    wCopy ()
    strClip = ClipGet ()
    If StrIndex (strClip, @CRLF, 0, @BACKSCAN) == StrLen (strClip) - 1 Then wSelLeft ()
    wCopy ()
    strClip = ClipGet ()
    strClip = strCmt : StrReplace (strClip, @LF, @LF : strCmt)
    ClipPut (strClip)
    wPaste ()
    wClearSel ()
    Drop (intClipLen, strClip, strCmt)
    Return

Block Unc&omment
    If !wGetSelState () Then Return
    strCmt = ";   "
    wCopy ()
    strClip = ClipGet ()
    If StrIndex (strClip, @CRLF, 0, @BACKSCAN) == StrLen (strClip) - 1 Then wSelLeft ()
    wCopy ()
    strClip = ClipGet ()
    strClip = StrReplace (@LF : strClip, @LF : strCmt, @LF)
    If StrIndex (strClip, @LF, 0, @FWDSCAN) == 1 Then strClip = StrSub (strClip, 2, -1)
    ClipPut (strClip)
    wPaste ()
    wClearSel ()
    Drop (intClipLen, strClip, strCmt)
    Return

Block E&xecute Code ; Executes a block of code
    If !wGetSelState ()
       Message ("Ooops!", "No block selected.")
       Return
    EndIf
    wCopy()
    strLines = ClipGet ()
    strFilename = ShortCutDir ("Local Settings", 0, 1) : "Temp\WB.Execute.wbt"
    intBytesWritten = FilePut (strFilename, strLines)
    ShellExecute (strFilename, "", "", @ZOOMED, "")
    Drop (intBytesWritten, strFilename, strLines)
    Return