PDA

View Full Version : Sendkeys and windows 10



R4+Z
11-22-2017, 08:43 PM
I haven't done any writing of code in years but recently was trained on some equipment that can only be programmed from a GUI. The problem is, there are some long winded tables that should be entered in order to do the job properly so I decided to try writing something to enter the tables for me. I have previously used sendkeys from an excel sheet to do this so I decided to try that.

Now as you probably know, Windows 10 blocks the use of sendkeys (at least in the circumstances I use them in) so I was wondering if there was a simple alternative. Any suggestions gratefully received, sample code follows.....


Sub test()

totrows = Range("A1").CurrentRegion.Rows.Count
For Count = 2 To totrows


Range("A" & Count).Select
Prefix = ActiveCell
Range("B" & Count).Select
Digits = ActiveCell
AppActivate "End of Dialing Table"
For x = 1 To 60000
Next x
SendKeys Prefix
SendKeys ("{tab}"), [True]
SendKeys Digits
SendKeys ("{tab} "), [True]
SendKeys ("{enter} "), [True]
Next Count
End Sub

Note, because of the nature of the GUI I have to open the window manually first.