COM Interface for Robin (COMIn4Robin)

Integration scenarios are very important in our increasingly heterogeneous application landscapes. From this perspective I developed a Component Object Model (COM) interface for Robin. This makes it possible to seamlessly integrate Robin into any COM-enabled programming language, e.g. like Visual Basic for Applications (VBA) in the Microsoft Office context, VBScript, AutoIt, AutoHotkey or SAP ABAP. Here an easy VBScript example:

'-Begin-----------------------------------------------------------------

Set Robin = CreateObject("COMIn4Robin.Execute")
RobinFile = "C:\Users\Robin\Dummy\Test.robin"

Result = Robin.Check(RobinFile)
If Result <> "" Then
  MsgBox Result, 0, "Error"
  Exit Sub
End If

Result = Robin.Run(RobinFile)
MsgBox Result

'-End-------------------------------------------------------------------

And here the Robin file:

#-Begin-----------------------------------------------------------------

Console.Write \
  Message : "Hello World"

#-End-------------------------------------------------------------------

Here the same approach in AutoIt:

;-Begin-----------------------------------------------------------------

$Robin = ObjCreate("COMIn4Robin.Execute")
$RobinFile = "C:\Users\Robin\Dummy\Test.robin"

$Result = $Robin.Check($RobinFile)
If $Result <> "" Then
  MsgBox(0, "Error", $Result)
  Exit
EndIf

$Result = $Robin.Run($RobinFile)
MsgBox(0, "Result", $Result)

;-End-------------------------------------------------------------------

COMIn4Robin uses the command line interface (CLI) of robin.exe. You can find a tiny documentation, the compiled COM libraries, a batch file for registration, the examples and the source code at my homepage.

Using Robin’s CLI via COM gives us many possibilities to use Robin’s capabilities in combination with many other existing and consolidated solutions.

1 Like

@StefanSchnell, that’s wonderful. I’m really looking forward to trying it out.
Regards,
burque505

1 Like

@StefanSchnell, here’s an AutoHotkey version of your example. I added a timeout on the message box, and for those of you at home :grinning: please be sure to adjust your path for ‘$RobinFile’. (I’ve used AutoIt syntax for the variables, i.e. starting with ‘$’, but that’s not usual practice in AutoHotkey.) Thanks a million for this! Works great.

$Robin := ComObjCreate("COMin4Robin.Execute")

$RobinFile := "C:\Users\burque505\Documents\Robin\COM\Examples\Test.robin"

  $Result := $Robin.Check($RobinFile)
  If ($Result <> "") {
    MsgBox %$Result%
    ExitApp
  }

  $Result := $Robin.Run($RobinFile)
  MsgBox, ,Result, %$Result%, 5

$Robin := "" 

Regards,
burque505

1 Like

@burque505

Thank you very much for your reply Winter :grinning:

1 Like

The link has changed to https://www.stschnell.de/index.htm#comin with an additional example for AutoIt.

1 Like