Post Reply 
GO TO? JUMP? [Solved]
11-25-2015, 05:27 PM (This post was last modified: 11-25-2015 05:29 PM by jrozsas.)
Post: #7
RE: GO TO? JUMP?
another REPEAT -- UNTIL 0 also works well.
Code:
SUB1();
SUB2();
SUB3();
SUB4();
SUB5();
SUB6();
EXPORT EC(x)
BEGIN
// CAS Custom Menu
// EWS 2014-04-20

REPEAT // this new REPEAT works!
LOCAL m,m1,mx,my;
WHILE MOUSE(1)≥0 DO END;
RECT;
TEXTOUT_P("How to GOTO?",1,1,4);


DRAWMENU("opt1","opt2","opt3","opt4","opt5","Sair");

REPEAT
m:=MOUSE;
m1:=m(1);
UNTIL SIZE(m1)>0;
mx:=m1(1);
my:=m1(2);



IF mx≥0 AND mx≤51 THEN
SUB1();
END;

IF mx≥53 AND mx≤104 THEN
SUB2();
END;

IF mx≥106 AND mx≤157 THEN
SUB3()
END;

IF mx≥159 AND mx≤210 THEN
SUB4();
END;

IF mx≥212 AND mx≤263 THEN
SUB5();
END;

IF mx≥265 AND mx≤319 THEN
SUB6();
END;
UNTIL 0;
END;


//SUB1
SUB1()
BEGIN
RECT;
TEXTOUT_P("PRESS SUB1",1,1,4);
WAIT(2);
END;

//SUB2
SUB2()
BEGIN
RECT;
TEXTOUT_P("PRESS SUB2",1,1,4);
WAIT(2);
END;

//SUB3
SUB3()
BEGIN
RECT;
TEXTOUT_P("PRESS SUB3",1,1,4);
WAIT(2);
END;

//SUB4
SUB4()
BEGIN
RECT;
TEXTOUT_P("PRESS SUB4",1,1,4);
WAIT(2);
END;

//SUB5
SUB5()
BEGIN
RECT;
TEXTOUT_P("PRESS SUB5",1,1,4);
WAIT(2);
END;

//SUB6
SUB6()
BEGIN
KILL;
//RECT;
//TEXTOUT_P("PRESS SUB6",1,1,4);
//WAIT(2);
END;

Leo

Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
GO TO? JUMP? [Solved] - jrozsas - 11-25-2015, 03:08 PM
RE: GO TO? JUMP? - Didier Lachieze - 11-25-2015, 03:22 PM
RE: GO TO? JUMP? - Han - 11-25-2015, 03:29 PM
RE: GO TO? JUMP? - jrozsas - 11-25-2015, 04:47 PM
RE: GO TO? JUMP? - primer - 11-25-2015, 05:03 PM
RE: GO TO? JUMP? - jrozsas - 11-25-2015, 05:17 PM
RE: GO TO? JUMP? - jrozsas - 11-25-2015 05:27 PM
RE: GO TO? JUMP? - jrozsas - 11-25-2015, 05:29 PM
RE: GO TO? JUMP? - ji3m - 11-26-2015, 12:05 AM



User(s) browsing this thread: 3 Guest(s)