Java Robot

조회 수: 12 (최근 30일)
nsbd
nsbd 2011년 7월 7일
Hi
I have a question with the use of java robot. We use the code ready to use them. So, how to write them to variables.
I mean key.keyPress(java.awt.event.KeyEvent.VK_A); without changing the spelling.variables, only the A or the value of writing

채택된 답변

Jan
Jan 2011년 7월 7일
Look at Kesh Ikuma's FEX: inputEmu.
  댓글 수: 1
nsbd
nsbd 2011년 7월 7일
Thank you.
----------------------------------------------------------------
function pop_1_Callback(hObject, eventdata, handles)
val = get(hObject,'Value');
switch val
case 1
handles.params = java.awt.event.KeyEvent.VK_1 ;
case 2
handles.params = java.awt.event.KeyEvent.VK_2 ;
case 3
handles.params = java.awt.event.KeyEvent.VK_3 ;
end
guidata(hObject, handles);
-----------------------------------------------------------------
function psh_1_Callback(hObject, eventdata, handles)
import java.awt.Robot
import java.awt.event.InputEvent
key = Robot();
pause(1.5)
key.keyPress(handles.params);
pause(0.004)
key.keyRelease(handles.params);
guidata(hObject, handles);
-----------------------------------------------------------------
There is little question.Don't click when opening a popup , pop-up does not value and I get an error.
function untitled_OpeningFcn(hOb... under the "set (handles.pop_1, 'value', 1);" do not write... changing only the opening sequence
thks.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Manipulator Modeling에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by