while trying to automate keyPress event in a loop, I get the error: "Unrecognized function or variable 'VK_i'
10 views (last 30 days)
I am trying to automate/simualte the keyboard to automatically generate/type numbers using the java robot class and I running into the following error: Unrecognized function or variable 'VK_i'. Could someone help. Here is my code snippet:
clc; clear; close all;
keybrd = java.awt.Robot; %Create a keyboard object
for i = 1:3
%num = num2str(i);
key = java.awt.event.KeyEvent.VK_i;