Page 1 of 1

Getting the Message

Posted: Sat May 28, 2016 3:51 am
by RossG
My stack takes input from the user clicking on buttons
1 to 36. The numbers are shown in a field.
On certain conditions a "beep" sounds.

If the user inputs an incorrect number and wants to
delete it the "Undo" button deletes the last number
input and re-processes the other numbers.

This causes lots of beeps since the same conditions
occur on this "replay".

I want to not have the beeps during the "Undo" process.

I expect that "without messages" will do it but
I still want messages under the normal conditions.

The "Undo" uses the same code as normal input
so I could copy it to the "Undo" mouseUp code
without any ill-effects but a more elegant solution
will satisfy more.

Ideas please with gratitude.

Re: Getting the Message

Posted: Sat May 28, 2016 12:45 pm
by dunbarx
Hi.

I would have to see your code to likely comment intelligently, but might you set a flag for normal beeping, that the "undo" handler could reset? You know(pseudo):

Code: Select all

if beepFlag is "true" then beep
This would be quite compact provided you have a single mouseUp handler in the card script to manage all those buttons. Do you?

Craig Newman

Re: Getting the Message

Posted: Sat May 28, 2016 8:44 pm
by RossG
Attached is the script of a programme I
wrote many (well, 8 or so) years ago.

It's similar to the one I'm working on now.

I've added a beep for a common condition
(StdDev) outside a range.

I've input some numbers which trigger the
beep. If you want to add more pick numbers
which are far apart.

Note: Clause 4.d.XXVIII of the Confidentiality Agreement you signed
says in part:

"The author of this programme was young (no more than 71 years old)
at the time and still learning Rev. Therefore for these and other reasons
(subject to a separate Confidentiality Agreement (such Agreement
being so confidential that you are not entitled to a copy of said
Agreement)) there is permitted no laughing, chuckling nor any other
form of hilarity while examining said code."

If you can find the code for "send flash" please let me know
where it is. I'd like to use it again but can't figure out where it is.

Re: Getting the Message

Posted: Sun May 29, 2016 5:10 pm
by jacque
Have you tried the built-in search and replace in the Edit menu? Use "flash" as the search term, choose to search only the current stack, and uncheck all the boxes except the one for scripts.

The search will show you all instances of the term in the lower pane. Double-click any instance and the script editor will open.