JDownloader Community - Appwork GmbH

Thread Tools Display Modes
Old 13.08.2021, 11:23
HeinerL HeinerL is offline
I will play nice!
Join Date: Apr 2020
Posts: 3
Default problem with even script Sound notification - Finished downloads

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:


the script is

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

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 11:27.
Reply With Quote
Old 13.08.2021, 11:31
raztoki's Avatar
raztoki raztoki is offline
English Supporter
Join Date: Apr 2010
Location: Australia
Posts: 17,443

'myString' ? remove the first line (complete) as you trigger it twice 'playwavaudio' and define JD_HOME unless thats system wide variable/reference
raztoki @ jDownloader reporter/developer

Don't fight the system, use it to your advantage. :]
Reply With Quote
Old 16.08.2021, 17:25
HeinerL HeinerL is offline
I will play nice!
Join Date: Apr 2020
Posts: 3

Hello Raztoki,

and thank you very much for your very quick reply. This was most helpful.

I removed the first line and now it is working just fine. Again, thank you very much for your help!


Reply With Quote
Old 18.08.2021, 16:46
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
Join Date: Mar 2009
Location: Germany
Posts: 76,742

@mgpai: Thanks for your fast help
JD-Dev & Server-Admin
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 03:39.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.