-
Notifications
You must be signed in to change notification settings - Fork 0
/
msagent.go
24 lines (19 loc) · 790 Bytes
/
msagent.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// +build windows
package main
import (
"time"
ole "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/go-ole/go-ole"
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/go-ole/go-ole/oleutil"
)
func main() {
ole.CoInitialize(0)
unknown, _ := oleutil.CreateObject("Agent.Control.1")
agent, _ := unknown.QueryInterface(ole.IID_IDispatch)
oleutil.PutProperty(agent, "Connected", true)
characters := oleutil.MustGetProperty(agent, "Characters").ToIDispatch()
oleutil.CallMethod(characters, "Load", "Merlin", "c:\\windows\\msagent\\chars\\Merlin.acs")
character := oleutil.MustCallMethod(characters, "Character", "Merlin").ToIDispatch()
oleutil.CallMethod(character, "Show")
oleutil.CallMethod(character, "Speak", "こんにちわ世界")
time.Sleep(4000000000)
}