AppleScript vs VBScript
lists at mangomultimedia.com
Wed Feb 3 15:23:37 CET 2016
On Wed, Feb 3, 2016 at 5:08 AM, Kay C Lan <lan.kc.macmail at gmail.com> wrote:
> Searching the List for VBScript examples I see nowhere where a global
> 'result' variable is defined but a simple test if LC's 'the result'
> contains "error".
Here is a VBScript I have used in the past that sets the <result> so that
the value is returned to LiveCode.
On Error Resume Next
'grabs the full process list and puts it in a var
if Err.Number = 0 then
set objService = getobject("winmgmts:")
for each Process in objService.InstancesOf("Win32_process")
theProcesses = theProcesses & Process.Name & vbLf
if Err.Number <> 0 then
result = Err.Number & ": " & Err.Description
result = theProcesses
www.screensteps.com - www.clarify-it.com
More information about the use-livecode