View Single Post
  #1  
Old 13.08.2021, 12:23
HeinerL HeinerL is offline
I will play nice!
 
Join Date: Apr 2020
Posts: 3
Default problem with even script Sound notification - Finished downloads

Hi,
initially i was looking hor how to play a sound after a download is finished.
I found this thread from 2015 with a script for the event scripter:

https://board.jdownloader.org/showthread.php?t=65410

the script is


Code:
playWavAudio(myString/*myFilePathOrUrl*/);/*Play a Wav Audio file*/
/* Example: */
playWavAudio(JD_HOME+"/themes/standard/org/jdownloader/sounds/captcha.wav");
i adapted this script as follows:
Code:
playWavAudio(myString/*C:\Windows\Media\Ring01.wav*/);/*Play a Wav Audio file*/
/* Example: */
playWavAudio(JD_HOME+"/themes/standard/org/jdownloader/sounds/captcha.wav");
but I am getting the Error
Code:
ReferenceError: "myString" is not defined. (#1)
and the details are as follows:

Code:
net.sourceforge.htmlunit.corejs.javascript.EcmaError: ReferenceError: "myString" is not defined. (#1)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3613)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3683)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.name(ScriptRuntime.java:1690)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1622)
	at script(:1)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:134)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115)
	at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212)
	at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:318)
	at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:180)
	at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:160)
I would like to ask somebody to help me to fix this problem.

Can you tell me what I am doing wrong?

Thank you and greetings

Last edited by raztoki; 13.08.2021 at 12:27.
Reply With Quote