Hi Alan and Elizabeth,
>^!If ^%IRW%<>1 Next ELSE Close
>;-----<end of clip<<
>I opened (also in focus) a new document then ran above clip:
>when I chose 2 it printed testclose into the document
>when I chose 1 it printed close into the document
The code looked good to me when I peeked at it earlier. Elizabeth,
when you get into those situations, try putting some ^!Prompt or
^!Info checks in (drag/drop/select/backspace makes it fast). For
^!Info %IRW%1 = ^%IRW%
^!If ^%IRW%=1 ^!Clip "Charged Report"
^!Info %IRW%2 = ^%IRW%
^!If ^%IRW%<>1 Next ELSE Close
^!Info %IRW%3 = ^%IRW%
or you could have wrote it like below putting two lines
^!If ^%IRW%<>1 Close else ^!Clip "Charged Report"
or as long as you would always either have a 1 or 0
you were looking for:
^!IfFalse ^%IRW% Close else ^!Clip "Charged Report"
Having it on one line seems less confusing to me with or without
a ^!Clip command and is the reason for having a true/false side
of the command for it to go to next depending on the variable.
^!If Integer1 <>= Integer2 GoToLabelTrue [ELSE GoToLabelFalse]
^!If "String1" <>= "String2" GoToLabelTrue [ELSE GoToLabelFalse]
^!IfFalse Value GoToLabelTrue [ELSE GoToLabelFalse]
Subscribe, UnSubscribe, Options