Hi,
At the site where I am working the users have many windows open at once and minimized. One of these windows is a mainframe session that is used for messages - a bit like MS Messenger but written for a M/F before MSG was born. When one user sends a message to another, a notification appears in the mainframe window, row 24 column 6 saying 'Alert received' or similar.
Somebody at the site, many years ago, wrote an app (in Delphi I believe) that interrogated the session using windows APIs and the like so that when the notification is received, a message pops up.
We are in the process of moving to Vista and the new mainframe emulation software is not as open as old one and the existing app cannot be used or amended.
Is there any way that this type of thing could be achieved in VBA? What I would like to do is have a script running on that session all the time, that looks at the specific row/column and pops up a message box when it finds a message have been received.
So far I've got the following, which works, but does not poll.
I hasten to add that I am not a VB developer and hardly know the language at all, other than that what I have picked up through looking at other peoples' scripts. I apologise in advance if this is a ludicrous thing to be attempting to do.
Marc
At the site where I am working the users have many windows open at once and minimized. One of these windows is a mainframe session that is used for messages - a bit like MS Messenger but written for a M/F before MSG was born. When one user sends a message to another, a notification appears in the mainframe window, row 24 column 6 saying 'Alert received' or similar.
Somebody at the site, many years ago, wrote an app (in Delphi I believe) that interrogated the session using windows APIs and the like so that when the notification is received, a message pops up.
We are in the process of moving to Vista and the new mainframe emulation software is not as open as old one and the existing app cannot be used or amended.
Is there any way that this type of thing could be achieved in VBA? What I would like to do is have a script running on that session all the time, that looks at the specific row/column and pops up a message box when it finds a message have been received.
So far I've got the following, which works, but does not poll.
Code:
Sub Alert()
'
' Alert macro
' Macro created 10/06/2009 by Marc.Lodge
'
Dim AlertNotify As String
Dim DisplayMsg As String
DisplayMsg = "Y"
AlertNotify = Session.GetDisplayText(24, 4, 6)
If AlertNotify = "alerts" Then
If DisplayMsg = "Y" Then
DisplayMsg = "N"
MsgBox "You have received a message"
End If
End If
If AlertNotify1 = " " Then
DisplayMsg = "N"
End If
End Sub
I hasten to add that I am not a VB developer and hardly know the language at all, other than that what I have picked up through looking at other peoples' scripts. I apologise in advance if this is a ludicrous thing to be attempting to do.
Marc