Sendkeys not working

Pete490h

Member
Local time
Today, 23:16
Joined
Jan 18, 2021
Messages
51
Wonder if anyone can help me with this code I have in an Event Procedure

Sendkeys “+{Right 4}, True

the shift element isn’t working as the cursor just moves right 4
 
Only one double quote?
 
No sorry, it does have both, missed it off this message😬


Sendkeys “+{Right 4}”, True
Just changed it to uppercase….

Sendkeys “{RIGHT 4}”, False
and it worked however when I add next line of code
Sendkeys “^V”
it doesn’t 😬
 
Okay, try the following experiment. Execute your code twice in a row. What happens?

Edit: Oops, too slow. The above was in response to your previous post, before you fixed it.
 
Okay, try the following experiment. Execute your code twice in a row. What happens?

Edit: Oops, too slow. The above was in response to your previous post, before you fixed it.
Still have the Sendkeys “^V” issue though
 
Still have the Sendkeys “^V” issue though
Not sure what to tell you. Most developers avoid or don't use Sendkeys. What are you trying to do? Maybe we can use code instead.
 
Not sure what to tell you. Most developers avoid or don't use Sendkeys. What are you trying to do? Maybe we can use code instead.
Trying to create a copy and paste routine but make it as automated as possible….

The operator opens form NISFeatureDataFrm and selects the data rows required for copying, which is VARIABLE
They would then click a form button which copies the data (Sendkeys “^c”)then opens another form, NISFeatureDataPasteFrm
This form opens with the paste area selected (this is the Sendkeys issue) then pastes the copied data
The remaining InspectionID field will fill in with the required number
Many thanks
 

Attachments

  • 6559DFDB-2E9D-4F1C-B356-D74393920E5F.jpeg
    6559DFDB-2E9D-4F1C-B356-D74393920E5F.jpeg
    4.3 MB · Views: 153
  • 0442EE94-17DD-482A-9DFF-753AAEA95A39.jpeg
    0442EE94-17DD-482A-9DFF-753AAEA95A39.jpeg
    1.5 MB · Views: 164
  • EB5C9F28-500A-42C1-B366-E6707D3C6A26.jpeg
    EB5C9F28-500A-42C1-B366-E6707D3C6A26.jpeg
    1.7 MB · Views: 154
Trying to create a copy and paste routine but make it as automated as possible….

The operator opens form NISFeatureDataFrm and selects the data rows required for copying, which is VARIABLE
They would then click a form button which copies the data (Sendkeys “^c”)then opens another form, NISFeatureDataPasteFrm
This form opens with the paste area selected (this is the Sendkeys issue) then pastes the copied data
The remaining InspectionID field will fill in with the required number
Many thanks
Hmm, so how did Sendkeys "+{RIGHT,4}" help to do that? That code will only select 4 characters.

In any case, you might want to investigate the SelTop and SelHeight properties. You might be able to use them to determine the selected items/records.
 
Hmm, so how did Sendkeys "+{RIGHT,4}" help to do that? That code will only select 4 characters.

In any case, you might want to investigate the SelTop and SelHeight properties. You might be able to use them to determine the selected items/records.
Sorry again, I’m going to have to get used to putting full details for you guys to help you understand
Before the Sendkeys, I told it to go to control ITEM, which then only need4 right moves😉

Do you think code could do it?

I’ve never used SelTop or SelHeight but still presume the paste issue would still apply🤔
 
Before the Sendkeys, I told it to go to control ITEM, which then only need4 right moves😉

Do you think code could do it?
Yes. For that, you could use the SelStart and SelLength properties.
 
Wonder if anyone can help me with this code I have in an Event Procedure

Sendkeys “+{Right 4}, True

the shift element isn’t working as the cursor just moves right 4

"Sendkeys Not Working"

.... that's normal.
Find another way, or disclose to any users that you don't warranty it
 
theDBguy & Isaac,
thanks for your assistance/comments……
I have changed the form designs and put the Sendkeys within a Function (see attachment) and I’m pleased to report that it works great
The operator will be so pleased that all they have to do now is type in the inspection report they wish to copy and click a button and hey presto👍
 

Attachments

  • FB4D4D05-63CD-4399-816B-0DF999E749FD.jpeg
    FB4D4D05-63CD-4399-816B-0DF999E749FD.jpeg
    2.9 MB · Views: 216
theDBguy & Isaac,
thanks for your assistance/comments……
I have changed the form designs and put the Sendkeys within a Function (see attachment) and I’m pleased to report that it works great
The operator will be so pleased that all they have to do now is type in the inspection report they wish to copy and click a button and hey presto👍
Hi. Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom