Greetings, It depends on your screen situation, so I can't give you a specific number. The Mylength needs to be set to the amount of spaces between the "number it should pick" and the item it is reading. To help find the number, select in the application viewer the number and right up to the item - the Field prompt in the AutoPause toolbar will display the starting Row and column and the length - that's what you set myLength to be. Regards, Thom
Thom C. Blackwell Product Manager Boston Software Systems (866) 653-5105 ex 807 www.bossoft.com LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately, then delete this message and empty from your trash. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chen, Scott C Sent: Monday, July 16, 2007 6:07 PM To: [email protected] Subject: RE: [Talk] PickItem Question What will you set the myLength to be? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Thom C. Blackwell Sent: Wednesday, July 11, 2007 10:12 AM To: [email protected] Subject: RE: [Talk] PickItem Question Greetings, Ah I see... Here's what it's doing. j = InStr(View(Row:=i, Col:=1, Length:=80), myItem) What this does is find what row and also the starting column for the item you are looking for. J would be the column position of the first character of myItem on the screen This reads to the left where the item was found to get a number that will get entered in temp = Trim(View(Row:=i, Col:=j - myLength, Length:=myLength)) If memory serves, this was added because there were screens where number/item pairs had smaller / larger amounts of spaces between them: 1 MyItem 1 2 MyItem 2 Or 1 MyItem 1 2 MyItem 2 So you'd set J to be = to the amount of space (number of columns) between the front of the 1 and MyItem 1 Thinking about this now, I probably could have done something a bit more elegant / Anybody want to set me up with access to a test system in STAR, I can get us a command built like we did with Meditech Magic to do this! Regards, Thom Thom C. Blackwell Product Manager Boston Software Systems (866) 653-5105 ex 807 www.bossoft.com LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately, then delete this message and empty from your trash. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chen, Scott C Sent: Wednesday, July 11, 2007 12:59 PM To: [email protected] Subject: RE: [Talk] PickItem Question Sub PickItem(myItem As String, myLength As Long) 'For next loop to "walk" down the screen and read each row For i = 3 To 27 'This reads a row and sees if the passed myItem is in row. If so it finds what column the menu item started. j = InStr(View(Row:=i, Col:=1, Length:=80), myItem) If j <> 0 Then 'If the item is found, then read to the left of it and grab the menu number, enter it and get out of the routine to proceed to greater things! temp = Trim(View(Row:=i, Col:=j - myLength, Length:=myLength)) temp = StrReplace(temp, "(", "") temp = StrReplace(temp, ")", "") Enter Trim(temp) Exit Sub End If Next i MsgBox "Menu Item not found" 'If the script gets here then there was a problem, you probably don't want to just pop-up 'a message box End Sub -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Thom C. Blackwell Sent: Wednesday, July 11, 2007 9:33 AM To: [email protected] Subject: RE: [Talk] PickItem Question Greetings, Ah I vaguely remember this as I was the one who wrote it - and it's a classic example of "I should have gotten the routine script for the script library"... Can you send me the actual PickItem sub routine - and I can read it and let you know what was going on in my brain at the time. Regards, Thom Thom C. Blackwell Product Manager Boston Software Systems (866) 653-5105 ex 807 www.bossoft.com LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately, then delete this message and empty from your trash. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chen, Scott C Sent: Wednesday, July 11, 2007 11:44 AM To: Boston WorkStation Group (E-mail) Subject: [Talk] PickItem Question Does anyone know whether the myLength field refers to the myItem Length or the option length. The notes are not very clear on this. Sub PickItem(myItem As String, myLength As Long) End Sub Thanks, Scott Chen Database Developer Providence Health & Services DISCLAIMER: This message is intended for the sole use of the addressee, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the addressee you are hereby notified that you may not use, copy, disclose, or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete this message. DISCLAIMER: This message is intended for the sole use of the addressee, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the addressee you are hereby notified that you may not use, copy, disclose, or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete this message. DISCLAIMER: This message is intended for the sole use of the addressee, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the addressee you are hereby notified that you may not use, copy, disclose, or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete this message.
