【HSP3】VOICEROID+ 東北ずん子をHSPから制御するモジュール Ver 0.01

VOICEROID+ 東北ずん子をHSPから制御するモジュールです。前シリーズと仕様が変わっています。NGワード系の処理が入っていません。

VOICEROID+ 東北ずん子をHSPから制御するモジュールです。前シリーズと仕様が変わっています。NGワード系の処理が入っていません。

#include "user32.as"
#include "kernel32.as"
#module __VOICEROID_ZUNKO__
#deffunc zunko_init
//
zunkowname1 = "VOICEROID *"
zunkowname2 = "VOICEROID "
zunkomainclass = "WindowsForms10.Window.8.app.0.17ad52b"
zunkoeditclass = "WindowsForms10.RichEdit20W.app.0.17ad52b"
zunkobuttonclass = "WindowsForms10.BUTTON.app.0.17ad52b"
return
// 調
#defcfunc GetZunkoRunningNumV
h = 0 : c = 0
repeat
FindWindowExA 0, h, zunkomainclass, zunkowname1
if stat == 0{
FindWindowExA 0, h, zunkomainclass, zunkowname2
}
h = stat
// 0
if h == 0 {
c = cnt : break
}
loop
return c
//
#defcfunc GetZunkoTopWindowV
FindWindowA zunkomainclass, zunkowname1
if stat == 0{
FindWindowA zunkomainclass, zunkowname2
}
return stat
//
#defcfunc GetZunkoTextBoxV
FindWindowExA GetZunkoTopWindowV(), 0, zunkomainclass, 0
hChild = stat
FindWindowExA hChild, 0, zunkomainclass, 0 //
FindWindowExA hChild, stat, zunkomainclass, 0 // 2
hChild = stat
FindWindowExA hChild, 0, zunkomainclass, 0 // 2()
FindWindowExA stat, 0, zunkomainclass, 0
FindWindowExA stat, 0, zunkomainclass, 0
FindWindowExA stat, 0, zunkomainclass, 0
hChild = stat
FindWindowExA hChild, 0, zunkoeditclass, 0
return stat
//
#defcfunc GetZunkoPlayButtonV
FindWindowExA GetZunkoTopWindowV(), 0, zunkomainclass, 0
hChild = stat
FindWindowExA hChild, 0, zunkomainclass, 0 //
FindWindowExA hChild, stat, zunkomainclass, 0 // 2
hChild = stat
FindWindowExA hChild, 0, zunkomainclass, 0 // 2()
FindWindowExA stat, 0, zunkomainclass, 0
FindWindowExA stat, 0, zunkomainclass, 0
FindWindowExA stat, 0, zunkomainclass, 0
hChild = stat
FindWindowExA hChild, 0, zunkomainclass, 0
hChild = stat
FindWindowExA hChild, 0, zunkobuttonclass, 0
return stat
//
#defcfunc GetZunkoStopButtonV
FindWindowExA GetZunkoTopWindowV(), 0, zunkomainclass, 0
hChild = stat
FindWindowExA hChild, 0, zunkomainclass, 0 //
FindWindowExA hChild, stat, zunkomainclass, 0 // 2
hChild = stat
FindWindowExA hChild, 0, zunkomainclass, 0 // 2()
FindWindowExA stat, 0, zunkomainclass, 0
FindWindowExA stat, 0, zunkomainclass, 0
FindWindowExA stat, 0, zunkomainclass, 0
hChild = stat
FindWindowExA hChild, 0, zunkomainclass, 0
hChild = stat
FindWindowExA hChild, 0, zunkobuttonclass, 0
FindWindowExA hChild, stat, zunkobuttonclass, 0
return stat
//
#deffunc ZunkoTextAllSelectV
sendmsg GetZunkoTextBoxV(), /*EM_SETSEL*/0x00B1, 0, -1
return stat
//
#deffunc ZunkoTextPasteV
sendmsg GetZunkoTextBoxV(), 0x0301/*WM_COPY*/, 0, 0
return stat
// UNDO
#deffunc ZunkoTextUndoV
sendmsg GetZunkoTextBoxV(), 0x0304/*WM_UNDO*/, 0, 0
return stat
//
#deffunc ZunkoTextCutV
sendmsg GetZunkoTextBoxV(), 0x0300/*WM_CUT*/, 0, 0
return stat
//
#deffunc ZunkoTextCopyV
sendmsg GetZunkoTextBoxV(), 0x0301/*WM_COPY*/, 0, 0
return stat
// ()
#deffunc ZunkoTextDeleteV
sendmsg GetZunkoTextBoxV(), 0x0303/*WM_CLEAR*/, 0, 0
return stat
// ()
#deffunc ZunkoTextDelete2V
msg = ""
sendmsg GetZunkoTextBoxV(), 0x000C/*WM_SETTEXT*/, 0, varptr(msg)
return stat
// ()
#deffunc ZunkoSetTextV str _msg
msg = _msg
sendmsg GetZunkoTextBoxV(), 0x000C/*WM_SETTEXT*/, 0, varptr(msg)
return stat
//
#deffunc ZunkoPlayTextV
sendmsg GetZunkoPlayButtonV(), 0x00F5/*BM_CLICK*/, 0, 0
return
//
#deffunc ZunkoStopTextV
sendmsg GetZunkoStopButtonV(), 0x00F5/*BM_CLICK*/, 0, 0
return
// (1)
// 0 1 2
#defcfunc IsZunkoPlayingV
sdim tmp, 64
sendmsg GetZunkoPlayButtonV(), 0x000D/*WM_GETTEXT*/, 64-1, varptr(tmp)
if stat == 0 : return 0
if instr(tmp, 0, "") != -1 {
return 0
}else : if instr(tmp, 0, "") != -1{
return 2
}
return 1
#global
// ↓
zunko_init
//
// 1
if GetZunkoRunningNumV() > 0 {
ZunkoSetTextV ""
ZunkoPlayTextV
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX