Hello everyone!
Okay . . . here is the scenario:
My company has a receptionist that needs to be able to send a message to an active user via NET SEND. I am trying to create an HTA so it is a little more "user friendly" for her. Here is what I have so far:
Fair Warning: I borrowed most of the code from someone else, so I have absolutely no idea what some of it does!
------------------------------------------------------------
<html>
<head>
<hta:application id = "netsend"
/>
<title>CBO Inner-Office Communicator</title>
<meta http-equiv = "content-script-type" content = "text/vbscript"/>
<script language = "VBScript"
type = "text/vbscript"
>
'<![CDATA[
''= sends mleMSG.value to all checked lbxCOMPUTERS.options[].value
' ============================================================================
Sub doSend()
' MsgBox "action doSend()"
Dim oOpt
For Each oOpt In document.all.lbxCOMPUTERS.options
If oOpt.selected Then
fakeSend oOpt.value, document.all.mleMSG.value
End If
Next
End Sub
''= fakes sending message sMsg to computer sName
' ============================================================================
Sub fakeSend( sName, sMsg )
MsgBox "About to send: " + vbCrLf _
+ sMsg + vbCrLf _
+ "to:" + vbCrLf _
+ sName
End Sub
''= refreshes the HTA page, which includes re-running any Windows_Onload code
' ============================================================================
Sub reloadHTA()
location.reload( True )
End Sub
']]>
</script>
</head>
<body>
<input type = "BUTTON" value = "Clear Form" onclick = "reloadHTA()">
<br>
<br>
Select User:<br>
<select size="1" id = "lbxCOMPUTERS">
<option value = "username1">User One
<option value = "username2">User Two
<option value = "username3">User Three
</select> <br>
<br>
Enter Message:<br>
<textarea id = "mleMSG"></textarea>
<br>
<br>
<input type = "BUTTON" value = "Send" onclick = "doSend()">
</body>
</html>
------------------------------------------------------------
Any help would be greatly appreciated!
[∞]MP
Okay . . . here is the scenario:
My company has a receptionist that needs to be able to send a message to an active user via NET SEND. I am trying to create an HTA so it is a little more "user friendly" for her. Here is what I have so far:
Fair Warning: I borrowed most of the code from someone else, so I have absolutely no idea what some of it does!
------------------------------------------------------------
<html>
<head>
<hta:application id = "netsend"
/>
<title>CBO Inner-Office Communicator</title>
<meta http-equiv = "content-script-type" content = "text/vbscript"/>
<script language = "VBScript"
type = "text/vbscript"
>
'<![CDATA[
''= sends mleMSG.value to all checked lbxCOMPUTERS.options[].value
' ============================================================================
Sub doSend()
' MsgBox "action doSend()"
Dim oOpt
For Each oOpt In document.all.lbxCOMPUTERS.options
If oOpt.selected Then
fakeSend oOpt.value, document.all.mleMSG.value
End If
Next
End Sub
''= fakes sending message sMsg to computer sName
' ============================================================================
Sub fakeSend( sName, sMsg )
MsgBox "About to send: " + vbCrLf _
+ sMsg + vbCrLf _
+ "to:" + vbCrLf _
+ sName
End Sub
''= refreshes the HTA page, which includes re-running any Windows_Onload code
' ============================================================================
Sub reloadHTA()
location.reload( True )
End Sub
']]>
</script>
</head>
<body>
<input type = "BUTTON" value = "Clear Form" onclick = "reloadHTA()">
<br>
<br>
Select User:<br>
<select size="1" id = "lbxCOMPUTERS">
<option value = "username1">User One
<option value = "username2">User Two
<option value = "username3">User Three
</select> <br>
<br>
Enter Message:<br>
<textarea id = "mleMSG"></textarea>
<br>
<br>
<input type = "BUTTON" value = "Send" onclick = "doSend()">
</body>
</html>
------------------------------------------------------------
Any help would be greatly appreciated!
[∞]MP