Announcement

Collapse
No announcement yet.

Alert.playSound()

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Alert.playSound()

    This looks as a trivial question but I do not understand what is going on.

    Line
    Alert.PlaySound("Yea"); //(or any other .wav file)

    works when called directly from main().
    The same line does not work when called from an if {} statement:

    if (nResult == 1) {
    debugPrintln("nResult = " + nResult);
    Alert.PlaySound("Yea");
    }

    The debugPrintln statement is there to verify that the if {} condition is true.

    Thanks

  • #2
    dtrosty
    I just tried the script enclosed below and the sound alert is triggering without any problems.
    You may want to post a complete code example that illustrates the problem
    Alex

    PHP Code:
    function main(){
        if(
    close(0)>high(-1)) var nResult 1;
        if(
    nResult==1){
            
    debugPrintln("nResult= "+nResult);
            
    Alert.playSound("ding.wav");
        }

    Comment

    Working...
    X