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
- TypeError: Object #<NodeList> has no method 'forEach' in javascript?
- JSON parsing with ruby one-liner ?
- Native JS like jQuery
- URL scrapping with javascript
- Download images with node.js
- TypeError: can't convert Regexp into String
- One click duckduckgo
- Comparing Strings with variable white spacing
- Watir Webdriver attach window
- Remotely enable remote desktop on Debian