I.T. Discussion Community!
-Collapse +Expand
Paradox
Search Paradox Group:

Advanced
-Collapse +Expand Paradox To/From
To/FromCODEGuides
-Collapse +Expand Paradox Store
PRESTWOODSTORE

Prestwood eMagazine

February Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyCorel Paradox / ObjectPAL Coding BoardObjectPAL Topic   Print This     

Sendkeys

Zonetrap
 (Inactive)
Austin

I'm looking into using sendkeys for a weekly function I want to accomplish. So I looked around and found this link:


http://www.prestwoodboards.com/ASPSuite/KB/Document_View.asp?QID=100211

On the bottom, it says

;Button :: pushButton
method pushButton(var eventInfo Event)
;% = ALT key.
sendKeys("%FOTCustomer{ENTER}")
endMethod

This should open up File, Open, Table, type Customer, and press enter.

I put this code in a button, but nothing happens. Someone must know the problem.

Thanks

 Posted 18 years ago (Thread Starter)
Comment Quote
About Zonetrap -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6124, 18 replies
Thread Started 5/7/2002 6:38:00 AM
View Counter=1006
Last Reply Posted 5/13/2002 8:55:00 AM)
Location=Austin  
Joined=18 years ago   MB Posts=33  
dhfast
Staten Island, NY 10314
Could you by any chance have designed the form containing the button as a dialog box? That can prevent sendkeys from working the way you want.
 Posted 18 years ago
Comment Quote
About dhfast -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6137 (Level 1.1)  Reply to 6124
Thread Started 5/7/2002 11:36:00 AM
View Counter=2
Location=Staten Island, NY 10314  
Joined=20 years ago   MB Posts=26  
dhfast
Staten Island, NY 10314
An other possibility - is there any code in e.g. the form's keyphysical method that could be trapping the sendkeys? For example, "if eventinfo.isaltkeydown() then disabledefault endif" would do so. If nothing else works, try substituting this for the sendkeys in pushbutton (there are other ways, as well)
method pushButton(var eventInfo Event)
var ol oleauto endvar
ol.open("Paradox.Application")
ol.tableopen("Customer")
endMethod
 Posted 18 years ago
Comment Quote
About dhfast -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6139 (Level 1.2)  Reply to 6124
Reply Posted 5/7/2002 2:18:00 PM
Location=Staten Island, NY 10314  
Joined=20 years ago   MB Posts=26  
dhfast
Staten Island, NY 10314
Paradox sendkeys is probably a higher level interface to keybd_event function in user32, so this could be a Windows problem. For example, I tested the sample code you posted for pushbutton on a Windows 98 system and it worked fine, but on a system running Windows 95 version B its performance was not consistent. If you are going to be using sendkeys to send some string to a Paradox form field, you could try using the Paradox keychar method. For example, if a form has a field called 'myfield' then a button on the same form with this code:

method pushButton(var eventInfo Event)
myfield.keychar("hello")
endMethod

will cause "hello" to appear in the field when pushed. Of course, this is just a toy example, and one wouldn't use this method generally for setting field values. Depending on what exactly you need sendkeys for, though, it might be applicable. There are several versions of keychar() and it can be used for uiobjects other than fields as well.
 Posted 18 years ago
Comment Quote
About dhfast -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6153 (Level 1.3)  Reply to 6124
Reply Posted 5/8/2002 6:31:00 PM
Location=Staten Island, NY 10314  
Joined=20 years ago   MB Posts=26  
Joe Ng
-- USA
Set the Wait to False

From the help file....

"The wait argument

wait specifies whether to wait after keys are sent, or to continue ObjectPAL execution. The recommended setting is False. Windows sometimes stops responding to sendKeys if the wait parameter is True (e.g., when keys are sent to nested dialogs). Set wait to False when changing the working directory or the private directory."
 Posted 18 years ago
Comment Quote
About Joe Ng -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #6196 (Level 1.4)  Reply to 6124
Reply Posted 5/10/2002 2:35:00 PM
Location=-- USA 
Joined=19 years ago   MB Posts=80  
The Big Jerm
 (Inactive)
Texas
I had this problem to after you write the code do a 'save as' and save it then open it up and it will work!
 Posted 18 years ago
Comment Quote
About The Big Jerm -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6134 (Level 1.5)  Reply to 6124
Reply Posted 5/7/2002 10:53:00 AM
Location=Texas  
Joined=19 years ago   MB Posts=88  
Langley McKelvy
Harris County Texas, USA
Instead of {ENTER} use the tilde character. (i.e.) sendKeys("%fotCustomer~") - worked fine for me, except that the customer table wasn't in my working directory.

Mac

Now that
Mac

[i]"A king will have his way in his own hall, be it folly or wisdom."[/i] - Gandalf
 Posted 18 years ago
Comment Quote
About Langley McKelvy -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Langley McKelvy
Computer Crimes Investigator / Computer Forensics Specialist Paradox for DOS/Windows Programmer

Post ID #6127 (Level 1.6)  Reply to 6124
Reply Posted 5/7/2002 8:18:00 AM
Location=Harris County Texas, USA  
Joined=18 years ago   MB Posts=387  
Langley McKelvy
Harris County Texas, USA
Just for informational purposes, my successful test was on Windows XP (pro) using Pdox9.
Mac

[i]"A king will have his way in his own hall, be it folly or wisdom."[/i] - Gandalf
 Posted 18 years ago
Comment Quote
About Langley McKelvy -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Langley McKelvy
Computer Crimes Investigator / Computer Forensics Specialist Paradox for DOS/Windows Programmer

Post ID #6158 (Level 1.7)  Reply to 6124
Reply Posted 5/9/2002 6:50:00 AM
Location=Harris County Texas, USA  
Joined=18 years ago   MB Posts=387  
Langley McKelvy
Harris County Texas, USA
Oh - one other thing. I put my code in a script, not attached to a button. Try that in your configuration just out of curiosity.
Mac

[i]"A king will have his way in his own hall, be it folly or wisdom."[/i] - Gandalf
 Posted 18 years ago
Comment Quote
About Langley McKelvy -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Langley McKelvy
Computer Crimes Investigator / Computer Forensics Specialist Paradox for DOS/Windows Programmer

Post ID #6159 (Level 1.8)  Reply to 6124
Reply Posted 5/9/2002 6:52:00 AM
Location=Harris County Texas, USA  
Joined=18 years ago   MB Posts=387  
Langley McKelvy
Harris County Texas, USA
The code: sendKeys("{F1}") worked just fine in my script.
Mac

[i]"A king will have his way in his own hall, be it folly or wisdom."[/i] - Gandalf
 Posted 18 years ago
Comment Quote
About Langley McKelvy -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Langley McKelvy
Computer Crimes Investigator / Computer Forensics Specialist Paradox for DOS/Windows Programmer

Post ID #6187 (Level 1.9)  Reply to 6124
Reply Posted 5/10/2002 6:28:00 AM
Location=Harris County Texas, USA  
Joined=18 years ago   MB Posts=387  
Zonetrap
 (Inactive)
Austin
method pushButton(var eventInfo Event)
sendkeys("%fotCustomer~")
endMethod

Thats the code I used, but Im not getting anything. I click the button, nothing happens. Really strange, Im not sure what it is.
 Posted 18 years ago (Thread Starter)
Comment Quote
About Zonetrap -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6131 (Level 1.10)  Reply to 6124
Reply Posted 5/7/2002 8:50:00 AM
Location=Austin  
Joined=18 years ago   MB Posts=33  
Zonetrap
 (Inactive)
Austin
Just tried that, still nothing, its like the sendkeys don't work at all. Its really strange.
 Posted 18 years ago (Thread Starter)
Comment Quote
About Zonetrap -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6136 (Level 1.11)  Reply to 6124
Reply Posted 5/7/2002 11:00:00 AM
Location=Austin  
Joined=18 years ago   MB Posts=33  
Zonetrap
 (Inactive)
Austin
I checked the forms Window Style, its not a dialog box.
 Posted 18 years ago (Thread Starter)
Comment Quote
About Zonetrap -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6138 (Level 1.12)  Reply to 6124
Reply Posted 5/7/2002 12:11:00 PM
Location=Austin  
Joined=18 years ago   MB Posts=33  
Zonetrap
 (Inactive)
Austin
I looked in keyPhysical, nothing there. I can open up tables, and most stuff, but I need to get some sendkeys going. This was just a test to see if they would work.

I have P.9 as well. I tried sendkeys("%f"), and still nothing. I dont think any of them work. Im wondering what this is about. Ill look into, maybe there is something.
 Posted 18 years ago (Thread Starter)
Comment Quote
About Zonetrap -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6145 (Level 1.13)  Reply to 6124
Reply Posted 5/8/2002 4:59:00 AM
Location=Austin  
Joined=18 years ago   MB Posts=33  
Zonetrap
 (Inactive)
Austin
What Im trying to do is to go into a folder, and delete Word Documents that containa certain text in them, like "Defunct". If the word doc. has this in it, I want it deleted. Form what I've heard, the best way is probably through sendkeys. Our company is upgrading to Win XP and P. 10 in a few weeks, so I guess I can take another shot at it then.

Thanks to all of you for helping. Everytime I post, there are various ways to answer a question, which allows me to think of new ways of writing OPAL.
 Posted 18 years ago (Thread Starter)
Comment Quote
About Zonetrap -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6157 (Level 1.14)  Reply to 6124
Reply Posted 5/9/2002 6:36:00 AM
Location=Austin  
Joined=18 years ago   MB Posts=33  
Zonetrap
 (Inactive)
Austin
The script worked!!! But nothing from the button. Interesting. Thanks a bunch. Now to write some code.
 Posted 18 years ago (Thread Starter)
Comment Quote
About Zonetrap -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6182 (Level 1.15)  Reply to 6124
Reply Posted 5/10/2002 5:08:00 AM
Location=Austin  
Joined=18 years ago   MB Posts=33  
Zonetrap
 (Inactive)
Austin
I can get the sendkeys("%fot~", true) code to work in the cript. Can anyone get the "VK_F1" or "VK_RWIN" to work?
 Posted 18 years ago (Thread Starter)
Comment Quote
About Zonetrap -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6183 (Level 1.16)  Reply to 6124
Reply Posted 5/10/2002 5:30:00 AM
Location=Austin  
Joined=18 years ago   MB Posts=33  
Most Recent Post
Zonetrap
 (Inactive)
Austin
The false statement worked! I got the sendkeys to go into Windows Explorer, search for files that contain a certain text, and delete them all. Its pretty nice to see something like that work.
Thanks to all for your help.
Z
 Posted 18 years ago (Thread Starter)
Comment Quote
About Zonetrap -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6205 (Level 1.17)  Reply to 6124
Reply Posted 5/13/2002 8:55:00 AM
Location=Austin  
Joined=18 years ago   MB Posts=33  
Deleted Member
I tried the sendkeys for opening a table as well.

I used a script. And it did NOT work. Even to the point of opening the table open dialog box. The menu would activate only thru %f; then it just sat there.

Paradox 9, sp2.
 Posted 18 years ago
Comment Quote
About deleted_member -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6142 (Level 1.18)  Reply to 6124
Reply Posted 5/7/2002 9:00:00 PM
Location=-- USA 
Joined=13 years ago   MB Posts=184  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1227A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #6124 Counter
1006
Since 4/2/2008

Regarding...

Linked Knowledge Base Article.

This thread is linked to the following KB article.


Mike Prestwood
1. Power: Chapter 16, Handling the Keyboard

Chapter 16, "Handling the Keyboard" from Paradox 9 Power Programming by Mike Prestwood.

Posted to KB Topic: P9 Book: Power Programming
17 years ago, and updated 9 years ago
(5 KB Comments)

KB Post
Nothing New Since Your Last Visit
15525
Hits

Corel Paradox / ObjectPAL Coding


Follow PrestwoodBoards on: 


©1995-2020 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech