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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pdox 9 - sendkeys

Status
Not open for further replies.

Taylormade

IS-IT--Management
Feb 9, 2003
7
0
0
GB
I have written many scripts in Paradox 8 which make use of "sendkeys", which do not work in verion 9?.
For example to show a query from a button sendKeys("%FOQ:work:george{ENTER}") This will show the query named george in version v8 but in v9 nothing haspens?
Has anyone any suggestions ?
 
Sendkeys?.. should ..umm..in my opinion.. only be used as a last resort. One of the reasons is that it is difficult to guarantee that the 'keystrokes' always get sent to the required application. There may also be an issue re time delays. You can improve the success rate with small things like:
- attaching to the form / application and bringing it to the top,
- setting the delay for sendKeys (see help file)

e.g.
Var
myApp Application
myFrm Form
endVar

myApp.bringToTop()
;in a form
myFrm.attach(getTitle())
myForm.bringToTop()
;use 0.1 sec between keys
sendKeys("%FOQ:work:george{ENTER}", 100)

A certain amout of trial and error is inevitable.
You can limit the amount of sendKeys by using menu commands like myForm.menuAction(menuQueryOpen) which remain compatible between versions. The list of menu commands is in the help file.

I'm not aware of a problem with sendkeys in V9.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top