interface to CScript.EXE (VBScript)
Posted: Thu Apr 09, 2009 4:22 pm
G'day everyone
Here's something I just cooked up as part of a test frame. It's a way of evaluating VBScript code from newLISP.
And here's an example of its use:
Kind regards,
Bruce.
Here's something I just cooked up as part of a test frame. It's a way of evaluating VBScript code from newLISP.
Code: Select all
(define (vbscript text)
(begin
(set 'aFile (open "c:/temp/temp.vbs" "write"))
(write-line aFile (string text))
(close aFile)
(exec "cmd.exe /C c:\\windows\\system32\\cscript.exe c:\\temp\\temp.vbs >c:\\temp\\temp.out" )
(set 'aFile (open "c:/temp/temp.out" "read"))
(set 'result (string (read-line aFile)))
(close aFile)
result
)
)
Code: Select all
(set 'foo "dim a
a = \"hello world\"
msgbox a
")
(vbscript foo)
Bruce.