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 :
'************************************************************
' POST TO TWITTER
'************************************************************
Sub PostToTwitter()
'TxtSnippet=ThisDoc.getCurrentController().getSelection().getByIndex(0).getString()
'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 & "" & " http://twitter.com/statuses/update.xml"
If GetGUIType=1 Then
On Error goto EH
Shell("curl.exe",1, TwMessage)
Else
Shell("curl",1, TwMessage)
End If
MsgBox ("The message has been posted.", , "All done!")
Exit Sub
EH:
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.
Recent blog posts
- watir-webdriver web inspector
- gem list to gemfile
- Packing ruby2.0 on debian.
- Made it into The Guinness Book!
- to_h in ruby 2.0
- Filter elements by pattern jQuery.
- Better HTML password fields for mobile ?
- Grayscale image when user offline
- nth-child CSS pseudo-class Christmas colors
- EventEmitter in nodejs