ADICON Support Forum Applied Digital, Inc.
Page 1 of 1 1
Topic Options
#19953 - 05/18/08 01:04 AM screenswitching with touch buttons
rolfgka Offline
newbie


Registered: 05/11/08
Posts: 6
Hi there
i´m desperately trying to program a touch button screen switching, but looks like i´m too stupid.

This is my little test program:

0001 - IF Touch Anywhere Button #0, Button Leopard is pressed
0002 - AND Variable# 63 / Screen# is NOT = 1
0003 - THEN Variable# 63 / Screen# = 1
0004 - IF Touch Object #2, Button Leopard is pressed
0005 - AND Variable# 63 / Screen# is NOT = 1
0006 - THEN Variable# 63 / Screen# = 7
0007 - IF Touch Object #1, Button Leopard is pressed
0008 - AND Variable# 63 / Screen# is NOT = 7
0009 - THEN Variable# 63 / Screen# = 1
0010 - End Program
There are two test screens ( #1 and #7) with one button each.
if touched it should switch on screen 1 to screen 7 and on screen 7 back to one.
It beeps if touched, but nothing happens. Screen is a leopard II
(European version) Cmax version 2.00e5.

Any idea or hint how to handle it.

Thanks for any help
rolfgka (Germany)

Top
#19955 - 05/18/08 04:57 AM Re: screenswitching with ouch buttons [Re: rolfgka]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6401
Loc: Montreal, QC, Canada
Testing for which screen you're on when a button is pressed (like you're doing with the AND statements) is superfluous since to press any given button, you have to already be on the screen where it is defined. Here is how you could write a program to switch between screens, assuming that button #1 is defined on screen #1 and button #2 is defined on screen #7:

0001 - IF Touch Object #1, Button Leopard is pressed
0002 - THEN Variable# 63 / Screen# = 7
0003 - IF Touch Object #2, Button Leopard is pressed
0004 - THEN Variable# 63 / Screen# = 1
0005 - End Program
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#19957 - 05/18/08 07:04 AM Re: screenswitching with touch buttons [Re: Guy Lavoie]
rolfgka Offline
newbie


Registered: 05/11/08
Posts: 6
Thank you for your quick response.

i´ve used your program and added 2 lines.
After downloading it, there will be the "Leopard " intro screen.
when i touch it it beeps but does´nt switch.
Where am i wrong?

0001 - IF Touch Anywhere Button #0, Button Leopard is pressed
0002 - THEN Variable# 63 / Screen# = 1
0003 - IF Touch Object #1, Button Leopard is pressed
0004 - THEN Variable# 63 / Screen# = 7
0005 - IF Touch Object #2, Button Leopard is pressed
0006 - THEN Variable# 63 / Screen# = 1
0007 - End Program
i´ve created 2 buttons . one on screen 1 object #1 and one on screen 7 object 2#

thanks in advance /

Top
#19958 - 05/18/08 10:21 AM Re: screenswitching with touch buttons [Re: rolfgka]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6401
Loc: Montreal, QC, Canada
Try setting it to screen 1 initially this way instead (replace lines 1 and 2):

0001 - IF Variable #63 = 255
0002 - THEN Variable #63 = 1
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#19965 - 05/19/08 10:15 AM Re: screenswitching with touch buttons [Re: Guy Lavoie]
rolfgka Offline
newbie


Registered: 05/11/08
Posts: 6
Hey Guy,
worked perfect, thank you very much.
I´m going on with my program, i´m shure it´was not my last question.

Top
Page 1 of 1 1


Moderator:  Dan Smith, Monte G, ADI Tech Support, Guy Lavoie 
Hop to:
Who's Online
3 registered (pbir, Bent, Martin in Texas) and 31 anonymous users online.
Recent Posts
SECU16IR Output Connecting To A Xantech Connecting Block
by Jean-Marie
Today at 08:36 AM
SECU16IR Output Connecting To A Xantech Connecting Block
by Jean-Marie
Today at 08:34 AM
how to post an icon
by manu
02/03/12 03:40 AM
Command Pair
by kuro
02/01/12 12:49 AM
Does anyone have a copy of the latest TSE?
by sevenzenith1
01/30/12 05:17 AM
Shout Box

Newest Members
feshh, manu, kuro, chuck214, Funkhauser
2747 Registered Users
Forum Stats
2747 Members
19 Forums
3837 Topics
22713 Posts

Max Online: 67 @ 08/16/11 03:08 PM
February
Su M Tu W Th F Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29