Title: Message

I’d suggest the following modification:

 

T$ = W.View(Window:="Print [EMAIL PROTECTED],84", Row:=i, Col:=1, length:=30, B:=bcComboBoxAll)

T$ = Left(T$, Instr(T$ &  vbCrLf, vbCrLf) – 1))

 

This will strip off everything after the carriage return-line feed characters, if any.

 

Rich McNeil

Boston Software Systems

866 653 5105

www.bostonworkstation.com


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Turner, Peter
Sent: Wednesday, July 14, 2004 9:44 AM
To: [EMAIL PROTECTED]
Subject: [Talk] Meditech CS printer dialog

 

Trying to get a grip on the Meditech CS printer dialog box.  I have found the code snippet on web page that purports to do it but it doesn't seem to operate very well.  I have seen post that claim this does work - am I missing something?

For one thing, I have discovered that it really doesn't seem to parse to the bottom of the possible printers in the dialog list.  If there are 6, I can get up to the 5th.  If there are  7, I can get to the 6th. If I request the last printer, if I don't limit it in some way, it just keeps incrementing until it hits integer overflow.

What seems to be some quirk in the View function W.View(Window:="Print [EMAIL PROTECTED],84", Row:=i, Col:=1, length:=30, B:=bcComboBoxAll) provides that instead of a row starting at column 1 and reading to a CrLf or 30 characters, it just reads the next 30 characters, including a CarridgeReturnLineFeed combination if it is there.  Oddly, it does not do it on the top item in the list 

Currently, the way the snippet is written it finds the currently selected printer - the one with the --> in the line above where it should be, because the view wraps around into the next line.  This is a parse as read by the view function.  #5 is the currently selected printer, but the code picks #4 instead, then moves incorrectly because the index was wrong.

1 >   \\FAS-BG5\DEFAULT         
2 >   \\FAS-BG5\DI-1L2<CrLf>   \\FAS-
3 >   \\FAS-BG5\DI-3L1<CrLf>   \\FAS-
4 >   \\FAS-BG5\ED-1L1<CrLf>-->\\FAS-
5 >-->\\FAS-BG5\ENT-1L1<CrLf>   \\FAS
6 >   \\FAS-BG5\IS-1D2<CrLf>   \\FAS-
7 >   \\FAS-BG5\IS-1L1<CrLf>   \\FAS-


I can deal with this by redoing the way the snippet operates, but I have been unable to read the last item in the list.  I have tried increasing the length but the data read still does not include the last printer in the list.

Reply via email to