View Single Post
  #573  
Old 08.02.2019, 00:45
almanteka almanteka is offline
Baby Loader
 
Join Date: Feb 2019
Posts: 9
Default Send Package Name to Batch

i'm trying to send package name to a batch file to send a push notification! the notification works as expected, but i like to include the package name, here are the scripts i'm testing

event scripter:
Code:
// TRIGGER = Package Finished
disablePermissionChecks();
var myFilePackage = package;
var myString = myFilePackage.getName();
callAsync(function(exitCode, stdOut, errOut) {}, "F:\\link to\\file.bat", "myString");

batch:
Code:
@echoff
myString=$1
curl -X POST -d "payload={\"text\": \"JDownloader: A file "'$myString'" has been completed!\"}" "**External links are only visible to Support Staff**

message received at notification service:
Code:
JDownloader: A file '$myString' has been completed!

any help will be appreciated! thanks in advance!

:attention:
Reply With Quote