PDA

View Full Version : Adding sound to error message


ABC123

kimkenm
02-19-2005, 06:39 PM
I'm a newbie and had a question. Right now I have the following that runs when an incorrect number is entered (after checking in a lookup). I want to add an alert sound to be played along with the message to get the person's attention in case they are not looking at the screen when entering info. Everytime I try to add the sound it plays everytime a number is entered, and I only want it to play when the error message is displayed. Help is greatly appreciated. The following is the script? I am using for the error message.

'Execute inline Xbasic code.
x=lookupc("F",a_field_value,"customerid","vendors.dbf","customerid")
if x = ""
ui_msg_box("ERROR",a_field_value + " DOES NOT EXIST")
sys_send_keys("{CTRL-E}")
end if

Stan Mathews
02-19-2005, 07:32 PM
I don't see the command to play the sound. where are you putting that?

JerryBrightbill
02-20-2005, 04:38 AM
The sound should be on the line just before the message

play_sound("Chimes", UI_SYSTEM_SOUND)
ui_msg_box("ERROR",a_field_value + " DOES NOT EXIST")

Jerry