JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
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

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

'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
http://svn.jdownloader.org/users/170

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

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!

Greetings

Heiner
Reply With Quote
  #4  
Old 18.08.2021, 16:46
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 72,531
Default

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

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 07:42.
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 - 2021, Jelsoft Enterprises Ltd.