04-10-2005, 05:40 AM
Hello,
FBSL version 3 dated from 10th of April 2005 now fully supports COM !
Samples + HTML doc comes to show you how to use ActiveX or COM objects with it !
Here is a simple sample that shows how to execute JavaScript via FBSL :
FBSL version 3 dated from 10th of April 2005 now fully supports COM !
Samples + HTML doc comes to show you how to use ActiveX or COM objects with it !
Here is a simple sample that shows how to execute JavaScript via FBSL :
Code:
Const szScript = "Math.pow(5, 2) * Math.PI"
Dim %scrCtl, %pResult, !fltResult
scrCtl = CreateObject( "MSScriptControl.ScriptControl", "" )
If scrCtl <> 0 and PutValue( scrCtl, ".Language = %s", "JScript" ) = 0 Then
PutValue( scrCtl, ".AllowUI = %b", TRUE)
PutValue( scrCtl, ".UseSafeSubset = %b", FALSE)
pResult = GetIntValue( scrCtl, ".Eval(%s)", "Math.round(" & szScript & ")" )
fltResult = GetDblValue( scrCtl, ".Eval(%s)", szScript)
? "(integer)JavaScript Math Round Code of (5*5)*PI returned value : " & pResult
? "(double)JavaScript Math Code of (5*5)*PI returned value : " & fltResult
End If
ReleaseObject( scrCtl )
Pause