Tacec
Member
Lets see, how to describe...
Im building a program with an ms agent which says a canned message, pulled from a table. If messageA in the table is stated by the agent, it should do X actions. If the active message is changed to another message in the table, the agent should do Y actions. The active message is always set to 1.
I need a way to tell when the active message has been changed in the table, so that whenever it does change, the agent's actions are different than the original actions.
We tried using NotificationID_New and Old as a means to differentiate old message vs new, but I think I'm at a loss from here. Did this make any sense??
Anyone have any suggestions?
Im building a program with an ms agent which says a canned message, pulled from a table. If messageA in the table is stated by the agent, it should do X actions. If the active message is changed to another message in the table, the agent should do Y actions. The active message is always set to 1.
VB.NET:
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] NotificationID_New [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Integer
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] NotificationID_Old [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2][COLOR=#000000] IsVisible [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#000000] [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Boolean[/COLOR][/SIZE][SIZE=2][COLOR=#000000] = [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]False
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]
If[/COLOR][/SIZE][SIZE=2] tmpDS.Tables("Notification").Rows.Count > 0 [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2]NotificationID_New = tmpDS.Tables("Notification").Rows(0).Item("NotificationID")
[/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] NotificationID_New <> NotificationID_Old [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].Merlin.Show()
[/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].Merlin.Play("Greet")
[/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].Merlin.Play("Wave")
[/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].Merlin.Play("Alert")
[/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].Merlin.Speak(tmpDS.Tables("Notification").Rows(0).Item("Title"))
[/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].Merlin.Speak(tmpDS.Tables("Notification").Rows(0).Item("Message"))
IsVisible = [/SIZE][SIZE=2][COLOR=#0000ff]True[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Else
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000]
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].Merlin.Show()
[/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].Merlin.Play("DoMagic1")[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][SIZE=2].Merlin.Play("DoMagic2")[/SIZE]
[/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].Merlin.Speak(tmpDS.Tables("Notification").Rows(0).Item("Title"))
[/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].Merlin.Speak(tmpDS.Tables("Notification").Rows(0).Item("Message"))[/SIZE]
[SIZE=2]
[/SIZE][SIZE=2][COLOR=#008000]
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]If
[/COLOR][/SIZE]
I need a way to tell when the active message has been changed in the table, so that whenever it does change, the agent's actions are different than the original actions.
We tried using NotificationID_New and Old as a means to differentiate old message vs new, but I think I'm at a loss from here. Did this make any sense??
Anyone have any suggestions?