Please forgive me writing to you on this e-mail address, but I find the
OOo world overwhelming from my limited knowledge of computing theory and
terminology, and I haven't found how or where to submit a request for
help.  I am looking for a snippet as described below.  Is this the sort
of thing that some kind person might write for me? If not, can you
please suggest where I might put my request?  I would be grateful for
any assistance.

I am happy to explain why I want it, but it's a long story -
essentially, it's for writing to an LED display hung over a theatrical
stage, using a WiFi connection from a laptop. If it works reliably, I
intend to make the code freely available, as this sort of requirement is
becoming increasingly in demand to help the hard-of-hearing and for
language barriers.  Current commercial software is either very expensive
or too crude. However, I need to implement the connection before I worry
about how to publish the code!  Anyway, here is the request.




Help with ip output stream from Basic macro in OOo Calc on XP.


I am attempting to send lines of text to a remote display device.  As a
first step, I have written a set of macros to extract the data I want
from a spreadsheet and save each line as a file on disc in the required
format.  I did this by copying bits of code I found, with a very
superficial understanding of how it all works.  I am very grateful to
all those who contribute examples and help.

My next step is to send the data to the display device instead of disc
file.  The instruction I have from the device manufacturer is -

"Use a socket component and transmit the data string to port 10001 on
the IP address of the display device."

I have no idea how to do this, and have not found examples that I
understand.  The display only listens and does not respond - does that
mean I should use UDP rather than TCP?   Below is my current output
routine.  I would be grateful for suggestions on how to convert or
replace it.


Sub DisplayText(FilePath as String, DataString as String)
rem            Currently writes a file to disc - overwriting the
previous.
rem            derived from Useful Macro Information. For
OpenOffice.org.
rem            by Andrew Pitonyak. www.pitonyak.org/oo.php and
CodeSnippets
Dim oFileAccess as Object
Dim oFile as Object
Dim oOutputStream as Object
        oFileAccess =
createUnoService("com.sun.star.ucb.SimpleFileAccess")
        oOutputStream =
createUnoService("com.sun.star.io.TextOutputStream")
        If oFileAccess.Exists(FilePath) Then
                oFileAccess.Kill(FilePath)
        Endif
        oFile = oFileAccess.OpenFileReadWrite(FilePath)
        oOutputStream.SetOutputStream(oFile.GetOutputStream)
        oOutputStream.WriteString(DataString)
        oOutputStream.CloseOutput()
End Sub




Thank you

Martin
Martin Jacobs

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to