Last active
October 14, 2016 09:50
-
-
Save chemp7/313f7031f8e9f37d9b5491ce62ab19cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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