How can I get MATLAB to open objects outside of MATLAB using the mouse?

1 view (last 30 days)
I can currently trying to see if I can automate tasks using a MATLAB program to move the cursor and select objects.
I can across the idea when I learned that using the set function, I can move the mouse cursor. Example to place the cursor in the middle of the screen.
ScreenSize=get(0,'ScreenSize');
set(0,'PointerLocation',[ScreenSize(3)/2,ScreenSize(4)/2]);
What I would like to know is if there is a command to then have MATLAB do either a single press or a double press so I could then be able to select and/or open files located on my desktop.
Thanks in advance.
EDIT:
My ultimate goal is to create a program that can control the computer based on hand movements and gestures. I have my project broken down into three steps right now.
Step 1: Recognize my hand in a steaming video. DONE
Step 2: Move the cursor on the screen in relation to the movement off my finger. DONE
Step 3: Be able to open a file based on a hand gesture. This is where my problem is. In an if statement, I can get MATLAB to recognize the hand gesture that I want to use to open a file (right now I have it to where MATLAB prints a text to the command window), but I do not know how to write a command to essentially perform a double press of the mouse button without physically pressing the mouse button.

Accepted Answer

Dr. Seis
Dr. Seis on 9 Dec 2011
There is some information: Here
Other contributors might know more about how to implement things like this that require extra Java stuff.
Look for Jan Simon's contribution to this problem in the newsreader thread: Here

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!