ayuda con el msagent

Iniciado por ebb, 13 Noviembre 2005, 05:55 AM

0 Miembros y 1 Visitante están viendo este tema.

ebb

mira esque imvoco o llamo el msagent desde VB6 pero el balloon o el globo te texto que le aparece no me sirve

entonces necesito un programa que me lo pongan el globo de texto como el del word 2002 como el ayudante 

NYlOn

cual es la diferencia entre el word 2002 y el msagent ??

MaLkAvIaN_NeT

#2
Clase Agente De Windows:

Private WithEvents agnAsistente As Agent
Private iaCargaAsistente As IAgentCtlCharacterEx

Private Declare Function GetWindowsDirectory Lib "kernel32" _
Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, _
ByVal nSize As Long) As Long

Enum Idioma ' Variable que nos permite saber el idioma en que hablara el CHAR
EnglishUS = &H409
EnglishGB = &H809
French = &H40C
Italian = &H410
Portuguese = &H816
Spanish = &HC0A
End Enum

Enum Muñeco ' Variable que no permite seleccionar que CHAR se ejecutara
genie = 0
merlin = 1
Robby = 2
Peedy = 3
End Enum

Enum Accion ' Las diferentes animación de los CHAR
Acknowledge
Alert
Announce
Blink
Confused
Congratulate
Decline
DoMagic1
DoMagic2
DontRecognize
Explain
GestureDown
GestureLeft
GestureRight
GestureUp
GetAttention
GetAttentionContinued
GetAttentionReturn
Greet
Hearing_1
Hearing_2
Hearing_3
Hide
Idle1_1
Idle1_2
Idle1_3
Idle1_4
Idle2_1
Idle2_2
Idle3_1
Idle3_2
LookDown
LookDownReturn
LookLeft
LookLeftReturn
LookRight
LookRightReturn
LookUp
LookUpReturn
MoveDown
MoveLeft
MoveUp
MoveRight
Pleased
Process
Processing
Read
ReadContinued
Reading
ReadReturn
RestPose
Sad
ShowA
Search
Searching
StartListening
StopListening
Suggest
Surprised
ThinkW
Thinking
Uncertain
Wave
WriteA
WriteContinued
WriteReturn
Writing
End Enum

Dim intAccion As Integer ' Determina que accion esta activo y lista para ejecutar
Dim strWindows As String ' Determina la carpeta donde esta instalado WINDOWS
Dim strMuñeco As String ' Determina que muñeco fue elegido por el usuario
Dim bytInicio As Byte ' Indica si hay un Muñeco activo
Dim Array_Accion(1 To 67) As String ' Lista de todas las acciones del CHAR
Dim bolBalloon As Boolean ' Determina se presenta un BALLON para presentar el texto (EL BALLON es como el globo que aparece en las tiras cómicas donde se escribe el mensaje)
Dim bolAutoHide As Boolean ' Determina si se esconde el BALLON cuando termina de presentar el mensaje
Dim bolAutoSpace As Boolean ' Determina el espacio entre las frases
Dim bolSonido As Boolean ' Determina si las animaciones presentaran sonidos

Private Sub Class_Initialize()
Set agnAsistente = New Agent
Carpeta_Windows
bytInicio = 0
bolAutoSpace = True
bolAutoHide = True
bolBalloon = True
Array_Accion(1) = "Acknowledge"
Array_Accion(2) = "Alert"
Array_Accion(3) = "Announce"
Array_Accion(4) = "Blink"
Array_Accion(5) = "Confused"
Array_Accion(6) = "Congratulate"
Array_Accion(7) = "Decline"
Array_Accion(8) = "DoMagic1"
Array_Accion(9) = "DoMagic2"
Array_Accion(10) = "DontRecognize"
Array_Accion(11) = "Explain"
Array_Accion(12) = "GestureDown"
Array_Accion(13) = "GestureLeft"
Array_Accion(14) = "GestureRight"
Array_Accion(15) = "GestureUp"
Array_Accion(16) = "GetAttention"
Array_Accion(17) = "GetAttentionContinued"
Array_Accion(18) = "GetAttentionReturn"
Array_Accion(19) = "Greet"
Array_Accion(20) = "Hearing_1"
Array_Accion(21) = "Hearing_2"
Array_Accion(22) = "Hearing_3"
Array_Accion(23) = "Hide"
Array_Accion(24) = "Idle1_1"
Array_Accion(25) = "Idle1_2"
Array_Accion(26) = "Idle1_3"
Array_Accion(27) = "Idle1_4"
Array_Accion(28) = "Idle2_1"
Array_Accion(29) = "Idle2_2"
Array_Accion(30) = "Idle3_1"
Array_Accion(31) = "Idle3_2"
Array_Accion(32) = "LookDown"
Array_Accion(33) = "LookDownReturn"
Array_Accion(34) = "LookLeft"
Array_Accion(35) = "LookLeftReturn"
Array_Accion(36) = "LookRight"
Array_Accion(37) = "LookRightReturn"
Array_Accion(38) = "LookUp"
Array_Accion(39) = "LookUpReturn"
Array_Accion(40) = "MoveDown"
Array_Accion(41) = "MoveLeft"
Array_Accion(42) = "MoveUp"
Array_Accion(43) = "MoveRight"
Array_Accion(44) = "Pleased"
Array_Accion(45) = "Process"
Array_Accion(46) = "Processing"
Array_Accion(47) = "Read"
Array_Accion(48) = "ReadContinued"
Array_Accion(49) = "Reading"
Array_Accion(50) = "ReadReturn"
Array_Accion(51) = "RestPose"
Array_Accion(52) = "Sad"
Array_Accion(53) = "Search"
Array_Accion(54) = "Searching"
Array_Accion(55) = "Show"
Array_Accion(56) = "StartListening"
Array_Accion(57) = "StopListening"
Array_Accion(58) = "Suggest"
Array_Accion(59) = "Surprised"
Array_Accion(60) = "Think"
Array_Accion(61) = "Thinking"
Array_Accion(62) = "Uncertain"
Array_Accion(63) = "Wave"
Array_Accion(64) = "Write"
Array_Accion(65) = "WriteContinued"
Array_Accion(66) = "WriteReturn"
Array_Accion(67) = "Writing"
End Sub

Public Property Get Sound() As Boolean
Sound = bolSonido
End Property
Public Property Let Sound(ByVal NuevoValor As Boolean)
iaCargaAsistente.SoundEffectsOn = NuevoValor
End Property
Public Property Get Balloon() As Boolean
Balloon = bolBalloon
End Property
Public Property Let Balloon(ByVal NuevoValor As Boolean)
bolBalloon = NuevoValor
If bolBalloon Then
iaCargaAsistente.Balloon.Style = iaCargaAsistente.Balloon.Style Or 1
Else
iaCargaAsistente.Balloon.Style = iaCargaAsistente.Balloon.Style And 0
End If
End Property
Public Property Get AutoHide() As Boolean
AutoHide = bolAutoHide
End Property
Public Property Let AutoHide(ByVal NuevoValor As Boolean)
bolAutoHide = NuevoValor
If bolAutoHide Then
iaCargaAsistente.Balloon.Style = iaCargaAsistente.Balloon.Style Or 4
Else
iaCargaAsistente.Balloon.Style = iaCargaAsistente.Balloon.Style And -5
End If
End Property
Public Property Get AutoSpace() As Boolean
AutoSpace = bolAutoSpace
End Property
Public Property Let AutoSpace(ByVal NuevoValor As Boolean)
bolAutoSpace = NuevoValor
If bolAutoSpace Then
iaCargaAsistente.Balloon.Style = iaCargaAsistente.Balloon.Style Or 8
Else
iaCargaAsistente.Balloon.Style = iaCargaAsistente.Balloon.Style And -9
End If
End Property
Private Sub agnAsistente_Command(ByVal UserInput As Object)
If UserInput.Name = "Opciones" Then
agnAsistente.PropertySheet.Visible = True
End If
End Sub


Public Sub Show(ByVal LenguajeID As Idioma, ByVal GUIA As Muñeco)
Select Case GUIA
Case 0
strMuñeco = "genie"
Case 1
strMuñeco = "merlin"
Case 2
strMuñeco = "peedy"
Case 3
strMuñeco = "robby"
End Select
If bytInicio = 1 Then
Unload
End If
agnAsistente.Characters.Load "CharacterID", strWindows & "msagent\chars\" & strMuñeco & ".acs"
Set iaCargaAsistente = agnAsistente.Characters("CharacterID")
iaCargaAsistente.Commands.Add "Opciones", "&Opciones Avanzadas"
iaCargaAsistente.LanguageID = LenguajeID
iaCargaAsistente.Show
iaCargaAsistente.Left = Screen.Width \ 15 - iaCargaAsistente.Width - 50
iaCargaAsistente.Top = Screen.Height \ 15 - iaCargaAsistente.Height - 50
bytInicio = 1
End Sub
Public Sub AcercaDe()
iaCargaAsistente.speack "by" + crlf + "MaLkAvIaN_NeT" + crlf + "jav_025@hotmail.com"
End Sub
Public Sub Unload()
agnAsistente.Characters.Unload "CharacterID"
End Sub
Public Sub Speak(ByVal strOracion As String)
iaCargaAsistente.Speak strOracion
End Sub
Public Sub Think(ByVal strOracion As String)
iaCargaAsistente.Think strOracion
End Sub
Public Sub Move(x As Integer, y As Integer)
iaCargaAsistente.MoveTo x, y
End Sub
Public Sub Action(accNombre As Accion)
iaCargaAsistente.Play Array_Accion(accNombre + 1)
End Sub
Private Sub Carpeta_Windows()
Dim Temp As String
Dim Ret As Long
Const MAX_LENGTH = 145
Temp = String$(MAX_LENGTH, 0)
Ret = GetWindowsDirectory(Temp, MAX_LENGTH)
Temp = Left$(Temp, Ret)
If Temp <> "" And Right$(Temp, 1) <> "\" Then
strWindows = Temp & "\"
Else
strWindows = Temp
End If
End Sub
Public Function Animations(ByVal indice As Integer) As String
Animations = Array_Accion(indice)
End Function
Public Sub Stop_Asistente()
iaCargaAsistente.Stop
iaCargaAsistente.Play "RestPose"
End Sub


Espero que les sirva
Salu2
MaLkAvIaN_NeT
a por las buenas ideas