[Solved] Basic Macro connect to TCP Socket Server

Java, C++, C#, Delphi, ??? - Using the UNO bridges

[Solved] Basic Macro connect to TCP Socket Server

Postby khanlon » Sat Nov 21, 2020 3:05 am

These questions pertain to the most recent OO and Libre versions and Windows 10.

Is it possible in ooBasic or Libreoffice Basic to send data to TCP socket and then receive the response? And if so, are there some examples posted for reference? I have spent considerable time looking without success.

Thanks.
Last edited by khanlon on Sat Nov 21, 2020 9:02 pm, edited 1 time in total.
OpenOffice 4.1.4 / Windows 10
khanlon
 
Posts: 8
Joined: Tue Oct 24, 2017 7:36 pm

Re: Basic Macro connect to TCP Socket Server

Postby JeJe » Sat Nov 21, 2020 1:23 pm

Don't know anything about this but there is this thread. Loads of other search results for Openoffice or LibreOffice and TCP

viewtopic.php?f=20&t=24331

Edit: not in BASIC though
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1251
Joined: Wed Mar 09, 2016 2:40 pm

Re: Basic Macro connect to TCP Socket Server

Postby Villeroy » Sat Nov 21, 2020 2:14 pm

The simplified macro language StarBasic is hard wired to the context of the embedding office suite. Controlling a running office suite via network sockets requires a true programming language with an UNO bridge such as Java, Cpp or Python.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28854
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Basic Macro connect to TCP Socket Server

Postby JeJe » Sat Nov 21, 2020 2:44 pm

It might or might not be possible to do it with the Windows API and adapting code available in VB6 to OOBASIC... one example in a zip here...

https://www.vbforums.com/showthread.php ... cp-connect
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1251
Joined: Wed Mar 09, 2016 2:40 pm

Re: Basic Macro connect to TCP Socket Server

Postby JeJe » Sat Nov 21, 2020 2:52 pm

Another way would be if you have a compiler that can compile an adaptation of that or some other code to a dll then you could make that and call it from within OOBasic.
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1251
Joined: Wed Mar 09, 2016 2:40 pm


Return to External Programs

Who is online

Users browsing this forum: No registered users and 2 guests