Gui Checkboxes and plot button Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
sar257

Gui Checkboxes and plot button  Topic is solved

26 Apr 2014, 21:23

Hello,

I have two check boxes AB and CD. AB and CD are array of numbers that I want to plot depending on which one is checked, and I would not like it to polt until I click the plot button. This is my code below, the problem is that it doesn't output anything and I get an error: Not enough input arguments. Please Help:

function varargout = Try1(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @Try1_OpeningFcn, ...
'gui_OutputFcn', @Try1_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
end

function Try1_OpeningFcn(hObject, eventdata, handles, varargin)
handles.output = hObject;
guidata(hObject, handles);
end

function varargout = Try1_OutputFcn(hObject, eventdata, handles)
varargout{1} = handles.output;
end

function AB_box_Callback(hObject, eventdata, handles)
AB_status=get(handles.AB_box,'value');
end

function CD_box_Callback(hObject, eventdata, handles)
CD_status=get(handles.soc_box,'value');
end

function plot_button_Callback(hObject, eventdata, handles, v_status,soc_status)
AB = [5 5.4 10.3 15.7];
CD=[45 45 22 11];

if get(AB_status,value)==1
plot(AB);
elseif get(CD_status)==1
plot(CD);
end
end
User avatar
berban
Posts: 97
Joined: 14 Apr 2014, 03:20

Re: Gui Checkboxes and plot button

26 Apr 2014, 22:10

This isn't AutoHotkey code... are you sure you are on the right website?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: filipemb, mikeyww and 182 guests