Skip to content

Instantly share code, notes, and snippets.

@chemp7
Last active October 14, 2016 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chemp7/313f7031f8e9f37d9b5491ce62ab19cd to your computer and use it in GitHub Desktop.
Save chemp7/313f7031f8e9f37d9b5491ce62ab19cd to your computer and use it in GitHub Desktop.
Uselsx "*javacon"
Use "LibLineNotify"
Sub Click(Source As Button)
Dim mySession As JavaSession
Dim myClass As JavaClass
Dim myObject As JavaObject
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim result As Boolean
Dim messageString As String
Dim accessToken As String
Dim re As Integer
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
re = Messagebox( "Send message to LINE Notify Service?" , 4 + 32 + 256 , "Send" )
If ( re = 7 ) Then
Exit Sub
End If
messageString = doc.messageString(0)
accessToken = doc.accessToken(0)
Set mySession = New JavaSession()
Set myClass = mySession.GetClass("chemp.notes.linenotify.LineNotify")
Set myObject = myClass.CreateObject
result = myObject.callEvent( accessToken , messageString )
If ( result ) Then
re = Messagebox( "The message has been sent." , 0 + 64 , "Send" )
End If
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment