Screen displays incorrectly with coded vs manual inputting
Screen displays incorrectly with coded vs manual inputting
(OP)
Hello,
Any help with the frustrating problem I am facing will be most welcome. The code that is written takes values from an excel spreadsheet and inputs to screen (on users app.).
The code works fine (taking values from respective cells as required and outputting) up until a certain point where the data is then incorrectly outputted to screen. If the sequence of steps are performed manually the output is correct; the same sequence in the coded version however, results in a different output.
As mentioned, this behaviour occurs at a certain point. On screen prior to entry via code the screen displayed is as:
** Repeatable Sequence 002 * * * * * * * * * *
Date/Time *98 :: / /
** Repeatable Sequence 002 * * * * * * * * * *
Date/Time *98 :: / /
Once the dates from excel are inputted the screen should display as follows (it does so when typed manually)
** Repeatable Sequence 002 * * * * * * * * * *
Date/Time *98 A:: SETT // 20070410
** Repeatable Sequence 002 * * * * * * * * * *
Date/Time *98 A:: TRAD // 20070409
the sequence was ....asett<Tab>date<Tab>atrad<Tab>date<14 further Tabs>
what does output (via code) to the screen is the following:
** Repeatable Sequence 002 * * * * * * * * * *
Date/Time *98 A:: SETT // 20070410 ATRAD
** Repeatable Sequence 002 * * * * * * * * * *
Date/Time *98 2:: 007 / / (cant remember this line - something similar)
I am completely stumped any sequence of changes to the number of tabs etc results in the same output.
Admittedly this is my first attempt at working with Extra, so hopefully this is a small problem and easily solvable (fingers crossed).
Thanks in advance for any help
Any help with the frustrating problem I am facing will be most welcome. The code that is written takes values from an excel spreadsheet and inputs to screen (on users app.).
The code works fine (taking values from respective cells as required and outputting) up until a certain point where the data is then incorrectly outputted to screen. If the sequence of steps are performed manually the output is correct; the same sequence in the coded version however, results in a different output.
As mentioned, this behaviour occurs at a certain point. On screen prior to entry via code the screen displayed is as:
** Repeatable Sequence 002 * * * * * * * * * *
Date/Time *98 :: / /
** Repeatable Sequence 002 * * * * * * * * * *
Date/Time *98 :: / /
Once the dates from excel are inputted the screen should display as follows (it does so when typed manually)
** Repeatable Sequence 002 * * * * * * * * * *
Date/Time *98 A:: SETT // 20070410
** Repeatable Sequence 002 * * * * * * * * * *
Date/Time *98 A:: TRAD // 20070409
the sequence was ....asett<Tab>date<Tab>atrad<Tab>date<14 further Tabs>
what does output (via code) to the screen is the following:
** Repeatable Sequence 002 * * * * * * * * * *
Date/Time *98 A:: SETT // 20070410 ATRAD
** Repeatable Sequence 002 * * * * * * * * * *
Date/Time *98 2:: 007 / / (cant remember this line - something similar)
I am completely stumped any sequence of changes to the number of tabs etc results in the same output.
Admittedly this is my first attempt at working with Extra, so hopefully this is a small problem and easily solvable (fingers crossed).
Thanks in advance for any help
RE: Screen displays incorrectly with coded vs manual inputting
I am naturally suspicious of using <TAB> when I'm coding. I find it leaves too much to chance. Plus, it takes up a lot of room in the code to tab through a bunch of fields before you get where you want to be.
Have you considered using a MoveTo statement to make sure that your cursor is in the right spot before executing the SendKeys statement?
Sess0.Screen.MoveTo xcoord, ycoord
Sess0.Screen.SendKeys("asett" & date)
xcoord and ycoord represent the spot on the screen where you want the first "a" to appear.
Good luck..
RE: Screen displays incorrectly with coded vs manual inputting
RE: Screen displays incorrectly with coded vs manual inputting
RE: Screen displays incorrectly with coded vs manual inputting
Looking at the screen shots in the original post, it appeared to me that the information being sent to the screen was breaking over several fields, with the first field being only one character wide.
If ZZZ789 does
CODE
then all that will show up on the screen is the "a". The rest will get lost.
If ZZZ789 does
CODE
Sess0.Screen.SendKeys("asett")
then "a" will show up in the first field, and "sett" will carry into the next field.
ZZZ789, what did you end up doing to solve the problem?
RE: Screen displays incorrectly with coded vs manual inputting
Unfortunately I've been caught up with another exercise (aka crises)and haven't had time to try and remedy the Extra problem with the suggestions given here. I am hoping to look at this problem either Thursday, or next week sometime and will then promptly give feedback.
This may be a silly question lmbayley, but how do I determine the xcoord and ycoord i.e the position of where I want to send the text to.
Thanks again
RE: Screen displays incorrectly with coded vs manual inputting
In the MoveTo and PutString statements, row comes first, then column:
Sess0.Screen.MoveTo RowNumber, ColumnNumber
-or-
Sess0.Screen.PutString "string", RowNumber, ColumnNumber
So, really, my examples above should have shown ycoord before xcoord if you're thinking in terms of x (horizontal) and y (vertical) axes. Sorry if that caused you any confusion!
RE: Screen displays incorrectly with coded vs manual inputting
Calculus