Getting the Message

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
RossG
Posts: 247
Joined: Thu Jan 08, 2015 7:38 am

Getting the Message

Post by RossG » Sat May 28, 2016 3:51 am

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.
Is age an excuse? Eighty-four and counting.
Programming powered by coffee.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10324
Joined: Wed May 06, 2009 2:28 pm

Re: Getting the Message

Post by dunbarx » Sat May 28, 2016 12:45 pm

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

RossG
Posts: 247
Joined: Thu Jan 08, 2015 7:38 am

Re: Getting the Message

Post by RossG » Sat May 28, 2016 8:44 pm

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.
Attachments
SpinMaster Beep.zip
(44.65 KiB) Downloaded 234 times
Is age an excuse? Eighty-four and counting.
Programming powered by coffee.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Getting the Message

Post by jacque » Sun May 29, 2016 5:10 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply