Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generating a wait state.
Message
From
19/11/1998 20:35:15
George Lee
Microcomputer Engineering Services, Llc
Huntington Beach, California, United States
 
 
To
19/11/1998 18:44:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00158843
Message ID:
00159625
Views:
42
>I still don't understand where/why you need the wait state. I made a very simple test form with 2 textboxes and 1 checkbox. In the Init of the form I have:
>
>KEYBOARD "12345{TAB}abcde{TAB}{ENTER}"
>
>This will input "12345" in the first textbox, "abcde" in the second, will check the checkbox and go back to the first textbox. And it works.
>
>Isn't something similar what you're doing?
>
>Vlad

Here's pseudocode of what we're trying to do.

I'm working worth a page of a pageframe and based on what type of text box is there I want to format my input accordingly.
LOCAL llCommandButton
llCommandButton = .F.
DO WHILE NOT llCommandButton
   llCommandButton =  fFillTextBoxes()
ENDDO

PROCEDURE  pFillTextBoxes
#DEFINE kcTab   CHR(9)
LOCAL loCurObj, llCommandButton, lcKeyBoard

loCurObj = _SCREEN.ACTIVEFORM.ACTIVECOTROL.

* Now get the type from the control source.
* Get the name
.
llCommandButton = .F.
DO CASE
     CASE < commandbutton >
            llCommandbutton = .T.
     CASE TYPE < numeric >
            lcKeyBoard = "10"
ENDCASE

KEYBOARD lcKeyBoard + kcTab

RETURN llCommandButton
The point of the code is that I won't know what is on the page prior to running the code. Your keyboard example may not work for specific textboxes. This is a kind of programmatic interactive tester that based on the type of the control box, I will keyboard certain values. Now granted certain fields need special handling. But I am working on something that will do special handling based on properties and methods in the objects that I am looking at.

In this kind of loop I need to keyboard. Get control back in the program. Keyboard again. And finally have some way of stopping. Here I am making an assumption that after tabbing through a number of fields, I will reach a command button and stop execution of the test. The test must run by itself. Eventually we plan to have it run a number of screens to simulate data-entry on several different machines for a more severe stress test.

I have looked at DOEVENTS that does kick out the whats stuffed in the keyboard buffer, but unfortunately it has a lot of unwanted side effects as well

I appreciate your comments VLAD. Any help you can give me with this problem would be greatly appreciated.

Dan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform