|
A test such as At(“Patient
[EMAIL PROTECTED],1”) won’t tell you that a patient has not been entered. Whether or not a patient is entered the Patient
ID label will still be at row 4, column 1.
A better test is: If At(“@4”) Then which will test if you’re on the fourth row or If At(“Patient ID”) Then which will test if you’re at the Patient ID prompt, or something
like: If Trim(View(4,14,15)) = “” Then which will test that there is nothing in the patient field. Here you may also want to test if the ID
has the correct format using VB’s Like command. -----Original Message----- I am trying to ensure that I am at the correct screen
/ prompt so that the script can go ahead and run. During the test, I navigate to the “Process a
Patient [EMAIL PROTECTED],1" screen, and let the cursor stay at the "Patient
[EMAIL PROTECTED],1" prompt (either blank or with a patient ID). The script flows as I
expect. The next test is to enter the patient ID, and the
cursor is then blinking at "[EMAIL PROTECTED],1". But when I press the hot key combination, I get my
error message from the ‘If At("Patient [EMAIL PROTECTED],1") Then’
test. I added the ‘At “”’ to clear
the At command, but it didn’t make a difference. I then debugged my way
through the At command as best I could, and it displays the r object in the
watch window as having all of the information for the "Patient
[EMAIL PROTECTED],1" (not what I expected). Is my logic incorrect? Am I not refreshing something
as I should? Should the ‘At “”’ clear out the r object,
and, if not, what does ‘At “”’ do that is considered a
reset? Any help or observations appreciated. Below is my function that is no working. Function StartScreen() As Boolean
If At("Process a Patient [EMAIL PROTECTED],1") Then At
"" If
At("Patient [EMAIL PROTECTED],1") Then 'If here, then patient
hasn't been
‘entered yet; can't proceed.
MsgBox "Patient must be entered before WinStrat processing can
begin."
StartScreen = False
At ""
Exit Function Else
Pause "[EMAIL PROTECTED],1"
'Ensure that we are at the selection field
StartScreen = True End
If
Else
MsgBox "Must be in - Process a Patient Abstract - screen to use
WinStrat interface hot key."
StartScreen = False
End If
At "" End Function TKs Lew Hundley Information Specialist - Programmer Silverton 503.873.1657 [EMAIL PROTECTED] |
- [Talk] Trouble using At() to test for prompts Lew Hundley
- RE: [Talk] Trouble using At() to test for prompts Rich McNeil
- RE: [Talk] Trouble using At() to test for prompts Terry Evans
