Jump to content
Macro Express Forums

Endless Loop Following Multiple Choice


jmb4370
 Share

Recommended Posts

I'm trying to have a multiple choice menu that has some normal choices, but if the user doesn't respond within 5 seconds or so, a beep sounds. I've tried setting a variable flag to "YES" within each menu choice, and having an endless loop after all the choices test for the "YES" flag, but that doesn't seem to work. I've also tried having all the menu choices in the ELSE portion of the endless loop; also no good.

 

With the code as below, macro action stops with the display of the multiple choice menu until a choice is made, regardless of the time.

 

Any suggestions would be most appreciated, as this doesn't seem that it should as difficult as it is to implement!

 

Michael

 

 

 

Variable Set String %T46% = "NO" //Initialize flag //

Variable Set String %T38% = "A" //Default value//

 

Multiple Choice Menu: Test //%T38% variable//

 

If Variable %T38% = "A"

...Variable Set String %T46% = "YES"

... [other actions here]

EndIf

 

If Variable %T38% = "B"

...Variable Set String %T46% = "YES"

... [other actions here]

EndIf

 

 

Repeat Until %T1% <> %T1%

...If Variable %T46% = "YES"

......Break

...Else

......Delay 5 seconds

......Sound Wav File: chord.wav

......Delay 250 miliseconds

......Sound Wav File: chord.wav

...End If

Repeat End

Link to comment
Share on other sites

Your observation is correct. When the Multiple Choice Menu command is used, it waits until the user inputs something before continuing with the macro.

 

Your desire to have a wave file play after 5 seconds is an interesting idea. Perhaps others would like a similar featore. You should enter this as a feature request at http://www.macros.com/requestfeature.htm.

 

In the meantime, here are a couple of ideas:

 

1. Play the .wav file before the Multiple Choice Menu command. Of course, that would mean that the user would hear the wav file every time, not just when they delayed answering for a while.

 

2. You could create a .wav file that has 5 or 10 seconds of silence at the beginning. Then you could have another .wav file that says something like 'done', 'thanks', 'tweep' or even 1 second of silence.

 

Play the first .wav file before the Multiple Choice Menu command. Make sure that the 'Wait for wave file to finish' checkbox is unchecked. Then play the second .wav file after the Multiple Choice Menu command.

 

What will happen is the .wav file with the silence will be 'playing' while the Multiple Choice Menu command is displayed. If the user answers, the first .wav file will be interupted by the second .wav file so the user will not hear the non-silent portion of the first .wav file. If the user does not respond quickly enough, they will hear the non-silent portion of the .wav file prompting them to answer.

 

If you use this suggestion, perhaps you would share your .wav files with the newsgroup so others here could use them.

Link to comment
Share on other sites

Kevin and all;

I used Roxio's Sound Editor to modify the standard ding.wav files. It was easy to create a silent file, and then a file with a 5 second blank, followed by a double ding, and then another five second blank, followed by a double ding. When I finished and got a one minute file, the original ding.wav file size of 79 KB had grown to 10,171 KB. A file with a 5 second blank and then one double ding had a file size of 1133 KB, while a five second blank followed by 5 repeats of double ding was 5482 KB. I compressed the five repeat, the silent file, and the 1 repeat here as an attachment.

 

Michael

Silence.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...