Page 1 of 1

AlertBox/MessageBox/InputBox + SystemSound

PostPosted: Wed May 23, 2012 5:22 am
by Apoleo
Hi,

I know there is a command to play system sounds.
Code: Select all
SystemSound "SystemStop"
SystemDefault, SystemAsterisk, SystemExclamation, SystemStop or SystemQuestion

Is it possible to add a new parameter to AlertBox/MessageBox/InputBox indicating the sound when alert is displayed?
Code: Select all
AlertBox "Title" "Welcome" "SystemAsterisk"
MessageBox "Title" "Are you sure?" "Yes|No" "[Answer]" "SystemExclamation"
InputBox "Title" "Type your code" "[Answer]" "SystemDefault"
None, SystemDefault, SystemAsterisk, SystemExclamation, SystemStop or SystemQuestion


It'd be very comfortable only one line of code.

Thanks

PostPosted: Wed May 23, 2012 8:08 am
by dec
Hi Apoleo,

Remember the NeoBook functions. In other words, you can prepare a function which internally use the appropiate "AlertBox" and "SystemSound" actions based on the functions arguments. So you can reach your objective: use a single line to produce your desired results.

Hope this can help in some manner. Anyway this is the right forum for your suggestion, so my proposed solution didn't eliminate the possibility that in the future NeoBook can incorporate something like this. But remember that NeoBook functions allow you to do "lot of things" using a "single line" of code. ;)

PostPosted: Wed May 23, 2012 9:51 am
by Apoleo
Hi dec
Remember the NeoBook functions.

Good one! :oops:

...so my proposed solution didn't eliminate the possibility that in the future NeoBook can incorporate something like this

Well, I know it isn't a great suggestion but always thinking doing much in less.

Saludos :wink:

PostPosted: Thu May 24, 2012 5:34 am
by dec
Hi there,

Another thing Apoleo. Some rare people (like me) deactive the Windows Sounds just when install a Windows from scratch. Since the "SystemSound" action use this system sounds, testing it, I don't hear any sound from this action. In other word, if you need to assert that a sound is played, maybe you need to use the "PlaySound" action instead. Maybe providing an option in your application that allow the user to use sounds or not. Maybe this can help in some manner. ;)

PostPosted: Thu May 24, 2012 3:09 pm
by smokinbanger
dec wrote:Hi there,

Another thing Apoleo. Some rare people (like me) deactive the Windows Sounds just when install a Windows from scratch. Since the "SystemSound" action use this system sounds, testing it, I don't hear any sound from this action. In other word, if you need to assert that a sound is played, maybe you need to use the "PlaySound" action instead. Maybe providing an option in your application that allow the user to use sounds or not. Maybe this can help in some manner. ;)

I very much agree with this. I, myself disable system sounds, too. So the "PlaySound" may be more effective.