Page 1 of 1

[Solved] Way to add basic 1 or 0?

PostPosted: Thu Apr 13, 2017 9:49 am
by chuckledarkly
Hello again!

My last question was solved super quick but i feel like this one is much harder. Is there a way to add a basic tracker of some sort? What I mean by this is could i add a button that when clicked on will do something different depending on whether or not another button has been pressed?

If this doesn't make sense i'll explain. I am making a slideshow for kids but I want to give them different final slides based on the answers they clicked along the way. Is some sort of tally or 1 or 0 switch possible?

If you have any ideas let me know, and Thanks!

Re: Way to add basic 1 or 0?

PostPosted: Thu Apr 13, 2017 10:04 am
by RoryOF
Let button1 set a flag to say it has been pressed. Then in button2 code add an IF condition that looks at button1 flag and does the complex operation, ELSE it does the simple button2 code. When you decide to reset the button1 flag is up to you - you might not wish it to be active for the duration of a session.

Re: Way to add basic 1 or 0?

PostPosted: Thu Apr 13, 2017 10:07 am
by chuckledarkly
yes that sounds like what I want to do but how would i go about it? My experience in impress is very light.

Re: Way to add basic 1 or 0?

PostPosted: Thu Apr 13, 2017 10:13 am
by RoryOF
You are now into OpenOffice Macro Programming; this will keep you busy and out of pubs for months, or else will drive you to drink.
Start with the OO Basic guide

There is a complete downloadable version of an earlier edition (which should adequately meet your needs) at
OO BASIC guide 3.2 PDF

Re: Way to add basic 1 or 0?

PostPosted: Thu Apr 13, 2017 10:19 am
by RoryOF
Some careful searches for OpenOffice (or LibreOffice) macros ought point you to existing code, which you may then need to modify for your purposes, in the light of your knowledge of BASIC or other computer coding.

Re: Way to add basic 1 or 0?

PostPosted: Thu Apr 13, 2017 12:33 pm
by chuckledarkly
Thanks for the info! Guess ill give it a whirl, maybe ill get lucky and fine some youtube video tutorials haha!

Re: [Solved] Way to add basic 1 or 0?

PostPosted: Fri Apr 14, 2017 10:22 am
by RoryOF
Youtube tutorials are no substitute for reading the documentation. The usual starting point for this is Andrew Pitonyak's works on macro programming, downloadable from
http://www.pitonyak.org/oo.php