SET USER
SET VAR vstring TEXT
SET VAR vtext =(CTXT( (SLEN((CVAL('USER'))))))
SET VAR vi INTEGER = 1
WHILE vi < ((SLEN((CVAL('USER')))) + 1) THEN
  SET VAR vc = (SGET(.vtext,1,.vi))
  SET VAR vstring = (.vstring & (CTXT((ICHAR(.vc)))))
  SET VAR vi = (.vi + 1)
ENDWHILE

PAUSE 2 USING .vstring
Return

This little bit tells a lot about what is going on.  The variable vUser will not
test to null because the underlying code transfers a Delphi string where the
first two characters are the length (which is 18) and the rest are packed with
hard spaces (ascii 255), so it can't test for null because it is not.  You are
going to have to test for some specific expected value and go from there...

----- Original Message ----- 
From: "Charles Parks" <[EMAIL PROTECTED]>
To: "RBG7-L Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, August 02, 2004 4:10 PM
Subject: [RBG7-L] - Icon Targets


If I use an icon on the desktop with a target that calls this code it
gives a different result than if I use the R>.  Are there different
settings from the icon target and the R>?


SET USER

--If the user hits [Esc] then the program should exit.  It exits from R>
but not from icon target.

  SET VAR vuser = (CVAL('user'))

  IF vUser IS NULL THEN
    SET VAR vUser = 'None'
  ENDIF --vUser IS NULL

  IF (vuser NOT IN ('None', 'Public')) THEN
    PAUSE 2 USING 'yes'
    SET VAR vUser = (CVAL('NetUser'))
  ELSE
    PAUSE 2 USING 'not'
    EXIT
  ENDIF --(CVAL('user')) not in ('None', 'Public')

Reply via email to