OOoTwitter | Open office Twitter

Question : How to twitt from open office?

Download and open this :OOTwitter

Now goto :
Tools -> Macros -> Organize macros -> OpenOffice. Org Basic.
Edit the OOoTwitter "username:yourpassword" to yours
Restart OO and then Tools-> Add-ons -> Post to Twitter
Now Twitt from OO :O)

Understanding the code :


Sub PostToTwitter()


'SplitStr = Split(TxtSnippet, "&")
'TwitterStatus = Join(SplitStr, "%20")

InputMessage=InputBox("Your message:", "Post to Twitter")

SplitStr = Split(InputMessage, " ")
TwitterStatus = Join(SplitStr, "%20")

'Replace the "username:yourpassword" part in the code below with your actual Twitter user name and password.
TwMessage=" -u username:yourpassword -d status=" & "" & TwitterStatus & "" & ""

If GetGUIType=1 Then
On Error goto EH
Shell("curl.exe",1, TwMessage)
Shell("curl",1, TwMessage)
End If

MsgBox ("The message has been posted.", , "All done!")

Exit Sub
MsgBox ("Looks like cURL is not installed.", , "Error!")

End Sub

The logic : an InputBox() is used to take the input message, which is then updated to twitter site using the update.xml and based on the status of the execution of the "curl" command the message is posted or not is reported.

Share this