Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timing: OIA Object vs Other Options

Status
Not open for further replies.

SkipVought

Programmer
Dec 4, 2001
47,487
US




Hi,

I noticed a discussion related to this issue and I wondered if there were some resons why using the OIA Object might be superior to, for instance, a method like this, or is it six of one and half dozen of the other...
Code:
   With oScrn
'......
                .MoveRelative 1, 1, 1
' the cursor has been moved away from the return location (3,19)
                .SendKeys ("<enter>")
                Do Until (.WaitForCursor(3, 19))
                    DoEvents
                Loop
'......
   End With

Skip,

[glasses] [red][/red]
[tongue]
 
None that I'm aware of Skip, although with the OIA you wouldn't need to know the specific location of the cursor return.

[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 
In our world we have screen prompts stating the result of the issued command. For each Command I have written a function that returns an integer indicating the error.

REQUEST COMPLETED Return 0
NO MATCHING CASES Return 1

ect ect

I prefer these as it allows me more error checking. It also allows me to correct the user request without further input from the user (in some instances).

Not that I need to explain this to you, but someone else may be interested in the same subject.


[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 
Also, the cursor move is less consistent. However, it should work in theory.

I've found that sometimes it doesn't return when you would expect it to. This may be unique to a particular version of EB, but I was using 6.5 at the time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top