Michelle,

I'm sorry, but it didn't connect with me that you were working with
Meditech Client Server.  The location you're reading is down in that
nasty Textout region of our screen which doesn't clear text by itself.
In other words, before you enter the field (i.e., before entering the
employee number) you should clear the text on the entire screen with the
command:  

        Key "@_CLEAR"

But an even better solution is to read the field's contents from Row 2,
so changing your script to:

        If Trim(View(2, 1, 3)) = "" Then

Should work.

Rich McNeil
Boston Software Systems
866 653 5105
www.bostonworkstation.com
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Barker, Michelle
Sent: Thursday, July 03, 2003 9:31 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Scripting Help for Newbie (with attachment)

Hi Rich,

 I only have to run this script every few months or so to update
clothing/cleaning allowances. This time I have about 700 records to run
it
on. I got some help from the programmers here and they thought that the
coordinates were off when the loop ran the second time.

It runs for the first record that has a blank field at the Ctl Hours
prompt
(4, 78, 3) and enters a zero correctly. Then it runs through the loop
again.
When it comes to the next record that has a blank field at the Ctrl
Hours
prompt it tabs past it because it's viewing a zero there rather than a
blank. 

We put in coordinates (3, 78, -1) the debugger showed a value of
"Enter/Edit
Timecards" (title bar) & a space or number (actual value in the field)
right
below it. With the correct coordinates (4, 78, 3) it shows a zero. It
seems
that the second run through on the loop the coordinates are not correct.
I
don't know how that's possible. The screen doesn't change between
records.

Michelle

-----Original Message-----
From: Rich McNeil [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 4:48 PM
To: [EMAIL PROTECTED]
Subject: RE: Scripting Help for Newbie (with attachment)


Michelle,

Let's see your script!

Rich McNeil
Boston Software Systems
866 653 5105
www.bostonworkstation.com
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Barker, Michelle
Sent: Wednesday, July 02, 2003 4:33 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Scripting Help for Newbie (with attachment)

Good idea - I'll try that!
Michelle

-----Original Message-----
From: Ross Stolle [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 4:28 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Scripting Help for Newbie (with attachment)


Michelle,
        Have you tried putting a short wait in front of the If Trim
command?
It might be blowing right past the field without getting a chance to
read
it.

Ross Stolle
Integration Engineer
Avera McKennan Hospital
Sioux Falls, SD



 -----Original Message-----
From:   Barker, Michelle [mailto:[EMAIL PROTECTED] 
Sent:   Wednesday, 02 July, 2003 3:22 PM
To:     '[EMAIL PROTECTED]'
Subject:        RE: Scripting Help for Newbie (with attachment)

Hi Rich,

Everything worked except the View function. I've tried it a couple
different
ways and it just has trouble "viewing" the blank field. With the code
below
I got it to view the first record with a blank field, but any other
records
after that it will just tab past it. 

            If Trim(View(4, 78, 5)) = "" Then
                Enter "0"  
            Else
                Tab_ "" 
            End If

Thanks,
Michelle


-----Original Message-----
From: Rich McNeil [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 01, 2003 10:44 AM
To: [EMAIL PROTECTED]
Subject: RE: Scripting Help for Newbie (with attachment)


1.  Pause "@4,78" '?? EVALUATE FOR VALUES - TAB PAST IF VALUE EXISTS -
ENTER "0" IF NOT ??
    If Trim(View(4,78,5)) = "" then Key "0" 
    Tab_ ""

2.  Pause "@10,6" '?? SEND KEY "PAGE DOWN" TO GET TO THE NEXT AVAILABLE
LINE IN FIELD ??
    Key "{PgDn}"

3.  One issue here is double entry...which is especially important here
with payroll information.  We've developed a structure for deal with
this in our "file.bas" project which parses your .txt file into a random
access file and keeps track of entries that have already been made
making sure they are not reentered.  This takes things up a notch in
complexity, but this is important in a production script that runs every
day as opposed to, say, a dictionary upload script that just runs once
and isn't sensitive to double entries.  The sample File.bas project uses
our demo apps as an example and can be found in ScriptSamples.zip.  By
the way, the structure of file.bas has the looping structure that
addresses your third question directly.

Rich McNeil
Boston Software Systems
866 653 5105
www.bostonworkstation.com
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Barker, Michelle
Sent: Tuesday, July 01, 2003 8:44 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Scripting Help for Newbie (with attachment)

... here's the attachment - I was trying to get out of the office a
little
too quickly last night.
Thanks
Michelle

-----Original Message-----
From: Barker, Michelle [mailto:[EMAIL PROTECTED]
Sent: Monday, June 30, 2003 5:55 PM
To: '[EMAIL PROTECTED]'
Subject: Scripting Help for Newbie

Hi,

I need help on 3 steps in my script:

1. I have a field that needs to be evaluated when the cursor stops on
it. If
there is a value the script should tab past it, if there isn't a value
the
script needs to add a zero.

2. When the script comes to a list field I need to send the "Page Down"
key
to it so the cursor will go to the next available space.

3. All my scripts in the past have been very simple and have read from a
data file consisting of a list of numbers, mnemonics, etc. I now need to
read from a list that contains an ID and a value (i.e. employee ID and
allowance $ value). My data file is tab delimited and I can get the
column
number for each value, but I'm not sure how to write the loop to put the
correct data where I need it.

I've attach part of the steps I'm doing (without the loop).

Thanks
Michelle

617-665-3432
Clinical Application Analyst
CHA Information Technology
[EMAIL PROTECTED]


____________________
Confidentiality Notice: This e-mail message, including any attachments,
is
for the sole use of the intended recipient(s) and may contain
confidential
and privileged information. Any unauthorized review, use, disclosure, or
distribution is prohibited. If you are not the intended recipient,
please
contact the sender by reply e-mail and destroy all copies of the
original
message.





Reply via email to