HP3000-L Archives

September 2001, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Robert Mills <[log in to unmask]>
Reply To:
Robert Mills <[log in to unmask]>
Date:
Fri, 28 Sep 2001 17:51:32 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (273 lines)
Here is the final version of the script that I wrote that, thanks to Harry,
now works.

parm help=''

if lft('!help',1) = '?' then
  setvar s chr(14)
  setvar b chr(14)+':'+chr(15)
  echo
![s+'R;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;']
  echo ![b+' PCUSER - Sets the NetworkUserName environmental variable.']
  echo
![s+'5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;']
  echo ![b+'']
  echo ![b+' Syntax:']
  echo ![b+'   PCUSER [?]']
  echo ![b+'']
  echo ![b+' Parameters:']
  echo ![b+'   ?       Displays this help screen.']
  echo ![b+'']
  echo ![b+' Restrictions:']
  echo ![b+'   WRQ Reflection (v6 and newer).']
  echo ![b+'']
  echo
![s+'F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;']
  #
  # Author: Robert W.Mills
  #
  # Modification History can be found at the end of this file.
  #
  deletevar s, b
  return
  endif

setvar pcuser_clearline '![chr(27)]A![chr(27)]K'

echo ![chr(27)]&oG
echo Sub Main
echo   With Application
echo    .WaitForHostTrigger
echo    .Transmit " NetworkUserName '" & .PCUserName & "'" & Chr$(rcCR)
echo     End With
echo   End Sub
echo ![chr(27)]&oH

input pcuser_name,,10
echo !pcuser_clearline
setvar !pcuser_name
deletevar pcuser_@

return

#-- DO NOT ENTER EXECUTABLE CODE AFTER ABOVE 'RETURN' STATEMENT.

Modification History:

Versn |   Date     | Who | Reason for Change
------+------------+-----+------------------------------------------
01.00 | 28/09/2001 | RWM | Initial version (thanks to: Harry Morris)

#===================================================================
# End of command file.
#===================================================================

regards,
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Robert W.Mills (Systems Development Manager) |
|Windsong Services, St. Mary Cray, ENGLAND    |
|Tel  : +44 (0)1689 870622 x3005              |
|Fax  : +44 (0)1689 899026                    |
|Email: [log in to unmask]  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-----Original Message-----
From: Harry Morris [mailto:[log in to unmask]]
Sent: 28 September 2001 17:29
To: Robert Mills; HP3000 "List Server
Subject: Re: Capturing Network Logon Name with Reflection...


I was able to get the following to work with version 7.0 of Reflections from
a command file on the
host.

echo ![chr(27)]&oG
echo Sub Main
echo    With Application
echo       .WaitForHostTrigger
echo       .Transmit .PCUserName & chr$(13)
echo    End With
echo End Sub
echo ![chr(27)]&oH
input NetworkUserName
showvar NetworkUserName

Harry

--- Robert Mills <[log in to unmask]> wrote:
> I'm running Reflection 8.0 and also can't get Tom's command file to work.
> I've been trying to get the following code to work - keep getting a 'The
> input timed read has expired. (CIWARN 9003)'.
>
> echo ![chr(27)]&oG
> echo Sub Main
> echo   With Application
> echo    .Transmit "setvar NetworkUserName '" & .PCUserName & "'" &
> Chr$(rcCR)
> echo     End With
> echo   End Sub
> echo ![chr(27)]&oH
> input pcuser_name,,10
> !pcuser_name
> deletevar pcuser_@
>
> Anybody (WRQ?) have any ideas?
>
> regards,
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> |Robert W.Mills (Systems Development Manager) |
> |Windsong Services, St. Mary Cray, ENGLAND    |
> |Tel  : +44 (0)1689 870622 x3005              |
> |Fax  : +44 (0)1689 899026                    |
> |Email: [log in to unmask]  |
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> -----Original Message-----
> From: Andrew Russel [mailto:[log in to unmask]]
> Sent: 28 September 2001 14:29
> To: [log in to unmask]
> Subject: Re: Capturing Network Logon Name with Reflection...
>
>
> Thanks for all the help so far, but...
>
> I tried Robert's suggestion below, which works
> brilliantly, returning my NT user name as an MPE
> variable. But as he suggests, I have not been able to
> find a way to run this from a command file or a
> program - I don't want to have to put the macro
> permanently onto over 200users machines, and would
> prefer to maintain it only on the HP.
>
> Tom suggested a way to do this from a command file
> (also below), but whichever way I try it, I haven't
> been able to get his command file to work (yet).
>
> If anyone knows how I can run Robert's suggestion
> below, without having to set it up as a macro, I would
> be delighted to hear from them.
>
> Many thanks in advance,
>
> Andrew.
>
> -----Original Message-----
> From:   Tom Emerson [mailto:[log in to unmask]]
> Sent:   27 September 2001 18:56
> To:     [log in to unmask]
> Subject:        Re: [HP3000-L] Capturing Network Logon Name
> with Reflection...
>
> * Please Note : This message was received from the
> Internet *
> _____________________________________________________________
>
> On Thu, 27 Sep 2001 17:38:28 +0100, Robert Mills
> <robert.mills@WINDSONG-
> SERVICES.CO.UK> wrote:
>
> >The following Reflection Basic code will create a
> variable on the HP3000.
> >Can't get it to work if stored and run from the host
> (yet). As they say
> >'Watch This Space'.
> >
> >Sub Main
> >  With Application
> >    .Transmit "setvar NetworkUserName '" &
> .PCUserName & "'" & Chr$(rcCR)
> >    End With
> >  End Sub
> >
>
> using that as a jumping off point, I found the
> following works at the
> command prompt:
>
> setvar esc chr(27)
> echo !esc&oG
> echo sub main
> echo     application.transmit "pcusername" &
> chr$(rcCR)
> echo end sub
> echo !esc&oH
> input uname
> echo You logged onto your PC as !uname
>
> (this is kept as the file "pcuname")
>
> :pcuname
>
> pcusername
> You logged onto your PC as pcusername
> :
>
>
> Note I've quoted "pcusername", thus making it a
> literal string -- I tried
> application.username, however my copy of reflection
> (5.2) does not think
> that "pcusername" is a component of the "application"
> class -- YMMV
>
> BUT, this excersise DID point out a cool thing or two,
> namely, the
>
>     esc&oG / esc&oH
>
> strings allow MULTIPLE messages to be passed to the
> PC, eventually
> executing as an entire RBS subroutine.  (I guess I'm
> to "old school" -- I'm
> used to the concept of the entire "command" needing to
> be passed as a
> single string from the HP to the PC...)
>
>
> -----Original Message-----
> From: Andrew Russel [mailto:[log in to unmask]]
> Sent: 27 September 2001 16:29
> To: [log in to unmask]
> Subject: Capturing Network Logon Name with
> Reflection...
>
>
> I'm not sure if this is possible???
>
> I have an application running on the HP3000. A user
> logs onto this application, through Reflection as...
>
> HELLO USER.ACCOUNT
>
> The USERname they specify is different from their NT
> logon user name. Within the program I would like to
> programmatically capture their Network logon name. Is
> this possible?
>
> I do not want to add/delete any users to accomplish
> this.
>
> Thanks in advance.
>
> Andrew
>
>
> ____________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2