Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Code that "push" a GUI button
Date: Tue, 29 Sep 2009 15:26:05 +0000 (UTC)
Organization: Cambridge Univ
Lines: 15
Message-ID: <h9t8ud$1eu$1@fred.mathworks.com>
References: <h9t666$qrn$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1254237965 1502 172.30.248.35 (29 Sep 2009 15:26:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 29 Sep 2009 15:26:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 870214
Xref: news.mathworks.com comp.soft-sys.matlab:573702


You can activate the callback function associated with a pushbutton from anywhere within a GUI m-file using:

pushbutton1_callback(handles.pushbutton1,eventdata,handles)

i.e. the user does not need to push the button directly.

If you're talking about a GUI of some external software, assuming you don't have source-code access, I think you can position the mouse pointer then use mouseclick commands to do it - but it'll be quite a ropey and bug-laden solution.




"Pablo " <pablo.gallegos@stfc.ac.uk> wrote in message <h9t666$qrn$1@fred.mathworks.com>...
> Hello everybody, 
>  I was wondering if there was a way to have matlab "push" a GUI button programatically, or in other words execute the bits of code that are normally executed while you push those GUI buttons.
> Thanking you in advance.