WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Samples from Users
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

WSPOPUP Addon - Run a hilighted block of code

This is a sample add-on menu item that can be placed in the WSP-USER.MNU file in your WinBatch\System directory that allows you to Hilight a block of code, right-click it, and execute just that block (or line) of code.
 Execute block of code   ; Executes a block of code
    A = wGetSelstate()
    If A != 1
         Message("Ooops","No block selected")
         Drop(A)
         Exit
       EndIf
    wCopy()
    A = ClipGet()
    cbfile = StrCat(DirHome(),"code_execute.wbt")
    ow_cb=FileOpen(cbfile,"WRITE")
    FileWrite(ow_cb,A)
    FileClose(ow_cb)
    Run(cbfile,"")
    Drop(A)
    Drop(cbfile)
    Drop(ow_cb)

Article ID:   W16266
File Created: 2009:07:13:09:41:26
Last Updated: 2009:07:13:09:41:26