home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 April / PCWorld_2000-04_cd.bin / Software / TemaCD / winedit / testnew.wb_ < prev    next >
Text File  |  1999-10-04  |  1KB  |  39 lines

  1. ;----------------------------------------------------------;
  2. ;                                                          ;
  3. ; showing off some new WinEdit macro functions...          ;
  4. ;                                                          ;
  5. ;----------------------------------------------------------;
  6.  
  7. wFileOpen("c:\wineditweb\authoring\test\purchase.html")
  8.  
  9. wSpellCheck()    ; check the spelling of the current document
  10.  
  11. wViewHTML()         ; send the current file to WinEdit Explorer
  12.  
  13. wFTPOpen()         ; ask WE_FTP to open a file for us
  14.  
  15. wFileNew()
  16. wInsLine("This line includes a linefeed")   ; like wInsString() + wNewLine()
  17. wInsLine("So does this one")
  18.  
  19. wFileOpen("d:\source\editor2\common\batuser.c")
  20. wCompile()   ; careful, it's multithreaded.  this will return immediately
  21. Delay(10)    ; so let's wait a while
  22. strOutput = wGetOutput()   ; load the contents of the active output window
  23. Message("Compiler output",strOutput)
  24.  
  25. wGoToLine(20)
  26. wGoToCol(10)
  27. wStartSel()
  28. wGoToLine(40)
  29. wGoToCol(20)
  30. wEndSel()
  31. list = wSelInfo()               ; returns a tab-delimited list of the block bounds
  32. BlockStartLine = ItemExtract( 1, list, @TAB)
  33. BlockStartCol  = ItemExtract( 2, list, @TAB)
  34. BlockEndLine   = ItemExtract( 3, list, @TAB)
  35. BlockEndCol    = ItemExtract( 4, list, @TAB)
  36. Message("BlockInfo", "Block start: Line %BlockStartLine% Column %BlockStartCol%%@CRLF%Block End:   Line %BlockEndLine% Column %BlockEndCol%")
  37.  
  38.  
  39.