Hello community,
often we discuss about
JaCoB (Java to COM Bridge).
Jabaco is absolut cool. It can natively combine DLL and JAR functions and with JaCoB also COM functions. Is there any other programming language that offers a similar range of variants on the Windows platform?
This combination works perfect from Windows XP to Windows 7, with all Java Version from 1.6.x to 1.7.x. I like it very much.
So here is another example, how to call VBScript inside Jabaco:
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
'-Begin-----------------------------------------------------------------
'-Constants-----------------------------------------------------------
Const Quote = Chr(34)
'-Sub RunScript-------------------------------------------------------
Sub RunScript(Script As String)
'-Variables-------------------------------------------------------
Dim MSScript As com#jacob#activeX#ActiveXComponent
Set MSScript = New ActiveXComponent("MSScriptControl.ScriptControl.1")
If MSScript <> Nothing Then
MSScript.setProperty("AllowUI", True)
MSScript.setProperty("Language", "VBScript")
MSScript.invoke("ExecuteStatement", Script)
End If
End Sub
'-Main-----------------------------------------------------------------
Public Sub Command1_Click()
RunScript "MsgBox " & Quote & "Ja" & Quote
End Sub
'-End--------------------------------------------------------------------
|
Cheers
Stefan