Ask Your Question
0

post to URL and process reply via macro [closed]

asked 2013-05-02 11:51:48 +0200

VDP gravatar image

Hi,

I know LibreOffice can GET or POST a form within Writer to a URL. The response from that URL is then displayed as an HTML reply (_blank, etc.).

I'd like to avoid opening the HTML reply and have it processed within a Basic macro I wrote. How can I do this? Which "event" should I link to my macro? How do I "read/process" the server's reply (as string)? A simple example that shows the basics would be greatly appreciated.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-10-31 02:14:23.627805

Comments

Thanks but I already saw that post. I got basic socket handling working but it's a bit odd that one should need to reinvent the wheel. I could make a socket connection and post data by eg. reading text field values (which incidentally I'm having trouble with) and sending them via POST then reading and parsing the reply. However, sending to an HTTPS server this way isn't as simple as in the forum example. Also, why re-implement everything when both OO and LO can already send form data to a URL?

VDP gravatar imageVDP ( 2013-05-03 08:34:44 +0200 )edit

All I'd really need is a way to "intercept" the form submission reply with a macro. I tried all the "form macro events" but none triggered my macro... Also, even if I did find the right "event" and triggered my macro, I wouldn't know how to access the server's reply (as string/array of bytes).

VDP gravatar imageVDP ( 2013-05-03 08:37:34 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2013-05-02 19:44:49 +0200

mahfiaz gravatar image

This thread should cover request making and getting the response.

http://www.oooforum.org/forum/viewtopic.phtml?t=17645

For parsing HTML it very much depends on how complex stuff you want to parse out. If it is e.g only text inside

Your text
then simple text search will do just fine.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-05-02 11:51:48 +0200

Seen: 883 times

Last updated: May 02 '13