Use function to do a sequence of Java.Robot KeyEvents

Hello,
My question is regarding making a matlab function that when called performs a certain sequenece of key commands that I already have established in a script. I am going to be using this sequence twice, so I figured I could use a function, but I am unsure what input/output arguments I would need to use because it doesn't really use any variables. My goadl is to try and reduce the clutter of code in my script.
Is there a way to do this, or possibly try a different approach?

댓글 수: 1

Jan
Jan 2012년 10월 31일
What does "perform a certain key commands" explicitly mean?

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

답변 (1개)

Jan
Jan 2012년 10월 31일

0 개 추천

Do I understand correctly: You have some lines of code and want to run them twice? Then join them in a script or a function without inputs and outputs.
What is the connection to the Java Robot?

댓글 수: 1

I have one set of code that I end up running twice in my script, and all the code does is perform key commands (i.e. tab, enter, up down, etc.) using java robot functionality, and I use KeyEvents to simulate key presses. The function I would ideally like to use would not take in any input arguements with the output being the key presses, not any variables. I hope that helps to define my question a little better.

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

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

질문:

2012년 10월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by