Commit d7f84327 authored by maybites's avatar maybites
Browse files

filter away messages sent to the shellHelper script (might be a reason for ugly crashes)

parent c5346eb4
outlets = 2; outlets = 3;
var myIndex=0; var myIndex=0;
var myPath = null; var myPath = null;
...@@ -85,6 +85,8 @@ function start(){ ...@@ -85,6 +85,8 @@ function start(){
myNewPath = myWinPath.replace('.exe', '_tb' + myIndex + '.exe'); myNewPath = myWinPath.replace('.exe', '_tb' + myIndex + '.exe');
myCommands[0] = myPath.replace('.exe', '_tb' + myIndex + '.exe'); myCommands[0] = myPath.replace('.exe', '_tb' + myIndex + '.exe');
myWinTask = myCommands[0].substring(myCommands[0].lastIndexOf('/') + 1); myWinTask = myCommands[0].substring(myCommands[0].lastIndexOf('/') + 1);
// setting the routepass filter for myWinTask
outlet(2, myWinTask);
// on windows we have to replace apostrophes with quotation marks: // on windows we have to replace apostrophes with quotation marks:
for(var i = 1; i < myCommands.length; i++){ for(var i = 1; i < myCommands.length; i++){
if((typeof myCommands[i]) === 'string'){ if((typeof myCommands[i]) === 'string'){
...@@ -113,25 +115,24 @@ function copy(){ ...@@ -113,25 +115,24 @@ function copy(){
} }
} }
function Exit(){
del();
}
function anything() function anything()
{ {
var a = arrayfromargs(messagename, arguments);
if(copyFeedback){ if(copyFeedback){
execute(); execute();
copyFeedback = false; copyFeedback = false;
} else if(runningFeedback){ } else if(runningFeedback){
if(a[0] === myWinTask){ if(messagename === myWinTask){
// -> task is already running - need to kill.. // -> task is already running - need to kill..
post("found running task: " + myWinTask + ". Killing it...\n"); post("found running task: " + myWinTask + ". Killing it...\n");
outlet(1, 'taskkill', '/IM', myWinTask, '/F'); outlet(1, 'taskkill', '/IM', myWinTask, '/F');
} }
copy(); copy();
runningFeedback = false; runningFeedback = false;
} else { }
if(a[0] === "Exit"){ // if the script exits, the path can be removed
del();
}
}
} }
function ignore(){ function ignore(){
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
"fileversion" : 1, "fileversion" : 1,
"appversion" : { "appversion" : {
"major" : 8, "major" : 8,
"minor" : 1, "minor" : 2,
"revision" : 10, "revision" : 0,
"architecture" : "x64", "architecture" : "x64",
"modernui" : 1 "modernui" : 1
} }
, ,
"classnamespace" : "box", "classnamespace" : "box",
"rect" : [ 2130.0, 367.0, 640.0, 480.0 ], "rect" : [ 766.0, 367.0, 640.0, 480.0 ],
"bglocked" : 0, "bglocked" : 0,
"openinpresentation" : 0, "openinpresentation" : 0,
"default_fontsize" : 12.0, "default_fontsize" : 12.0,
...@@ -39,6 +39,30 @@ ...@@ -39,6 +39,30 @@
"subpatcher_template" : "", "subpatcher_template" : "",
"assistshowspatchername" : 0, "assistshowspatchername" : 0,
"boxes" : [ { "boxes" : [ {
"box" : {
"id" : "obj-5",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 68.0, 377.0, 19.0, 22.0 ],
"text" : "t l"
}
}
, {
"box" : {
"id" : "obj-4",
"maxclass" : "newobj",
"numinlets" : 3,
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 68.0, 331.0, 110.0, 22.0 ],
"text" : "routepass task Exit"
}
}
, {
"box" : { "box" : {
"id" : "obj-3", "id" : "obj-3",
"maxclass" : "newobj", "maxclass" : "newobj",
...@@ -59,7 +83,7 @@ ...@@ -59,7 +83,7 @@
"numinlets" : 0, "numinlets" : 0,
"numoutlets" : 1, "numoutlets" : 1,
"outlettype" : [ "" ], "outlettype" : [ "" ],
"patching_rect" : [ 49.0, 21.0, 30.0, 30.0 ] "patching_rect" : [ 68.0, 22.0, 30.0, 30.0 ]
} }
} }
...@@ -71,7 +95,7 @@ ...@@ -71,7 +95,7 @@
"maxclass" : "outlet", "maxclass" : "outlet",
"numinlets" : 1, "numinlets" : 1,
"numoutlets" : 0, "numoutlets" : 0,
"patching_rect" : [ 49.0, 346.0, 30.0, 30.0 ] "patching_rect" : [ 158.0, 377.0, 30.0, 30.0 ]
} }
} }
...@@ -83,7 +107,7 @@ ...@@ -83,7 +107,7 @@
"numoutlets" : 1, "numoutlets" : 1,
"outlettype" : [ "bang" ], "outlettype" : [ "bang" ],
"parameter_enable" : 0, "parameter_enable" : 0,
"patching_rect" : [ 49.0, 143.0, 24.0, 24.0 ] "patching_rect" : [ 68.0, 144.0, 24.0, 24.0 ]
} }
} }
...@@ -94,7 +118,7 @@ ...@@ -94,7 +118,7 @@
"numinlets" : 2, "numinlets" : 2,
"numoutlets" : 1, "numoutlets" : 1,
"outlettype" : [ "bang" ], "outlettype" : [ "bang" ],
"patching_rect" : [ 49.0, 183.0, 61.0, 22.0 ], "patching_rect" : [ 68.0, 184.0, 61.0, 22.0 ],
"text" : "delay 500" "text" : "delay 500"
} }
...@@ -106,7 +130,7 @@ ...@@ -106,7 +130,7 @@
"numinlets" : 2, "numinlets" : 2,
"numoutlets" : 1, "numoutlets" : 1,
"outlettype" : [ "" ], "outlettype" : [ "" ],
"patching_rect" : [ 49.0, 228.5, 556.0, 22.0 ] "patching_rect" : [ 68.0, 229.5, 556.0, 22.0 ]
} }
} }
...@@ -119,7 +143,7 @@ ...@@ -119,7 +143,7 @@
"numinlets" : 1, "numinlets" : 1,
"numoutlets" : 2, "numoutlets" : 2,
"outlettype" : [ "", "bang" ], "outlettype" : [ "", "bang" ],
"patching_rect" : [ 49.0, 288.0, 77.0, 19.0 ], "patching_rect" : [ 68.0, 289.0, 77.0, 20.0 ],
"saved_object_attributes" : { "saved_object_attributes" : {
"shell" : "(default)", "shell" : "(default)",
"stderr" : 1 "stderr" : 1
...@@ -134,9 +158,9 @@ ...@@ -134,9 +158,9 @@
"id" : "obj-9", "id" : "obj-9",
"maxclass" : "newobj", "maxclass" : "newobj",
"numinlets" : 1, "numinlets" : 1,
"numoutlets" : 2, "numoutlets" : 3,
"outlettype" : [ "", "" ], "outlettype" : [ "", "", "" ],
"patching_rect" : [ 49.0, 103.0, 342.0, 22.0 ], "patching_rect" : [ 68.0, 104.0, 342.0, 22.0 ],
"saved_object_attributes" : { "saved_object_attributes" : {
"filename" : "shellHelper.js", "filename" : "shellHelper.js",
"parameter_enable" : 0 "parameter_enable" : 0
...@@ -165,17 +189,7 @@ ...@@ -165,17 +189,7 @@
} }
, { , {
"patchline" : { "patchline" : {
"destination" : [ "obj-1", 0 ], "destination" : [ "obj-4", 0 ],
"order" : 0,
"source" : [ "obj-21", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-9", 0 ],
"midpoints" : [ 58.5, 329.0, 31.5, 329.0, 31.5, 88.0, 58.5, 88.0 ],
"order" : 1,
"source" : [ "obj-21", 0 ] "source" : [ "obj-21", 0 ]
} }
...@@ -207,6 +221,35 @@ ...@@ -207,6 +221,35 @@
"source" : [ "obj-31", 0 ] "source" : [ "obj-31", 0 ]
} }
}
, {
"patchline" : {
"destination" : [ "obj-1", 0 ],
"source" : [ "obj-4", 2 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-5", 0 ],
"source" : [ "obj-4", 1 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-5", 0 ],
"source" : [ "obj-4", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-9", 0 ],
"midpoints" : [ 77.5, 417.0, 15.5, 417.0, 15.5, 89.0, 77.5, 89.0 ],
"source" : [ "obj-5", 0 ]
}
} }
, { , {
"patchline" : { "patchline" : {
...@@ -230,25 +273,32 @@ ...@@ -230,25 +273,32 @@
"source" : [ "obj-9", 0 ] "source" : [ "obj-9", 0 ]
} }
}
, {
"patchline" : {
"destination" : [ "obj-4", 1 ],
"source" : [ "obj-9", 2 ]
}
} }
], ],
"dependency_cache" : [ { "dependency_cache" : [ {
"name" : "shellHelper.js", "name" : "shellHelper.js",
"bootpath" : "D:/03_personal/MartinFroehlich/TeSApp/javascript", "bootpath" : "~/Arbeiten/01_projekte/181111_IASpace/01_projekte/20xx_Telematik/01_dev/telemersive-gateway/code",
"patcherrelativepath" : "../../javascript", "patcherrelativepath" : "../../code",
"type" : "TEXT", "type" : "TEXT",
"implicit" : 1 "implicit" : 1
} }
, { , {
"name" : "shell.mxe64", "name" : "shell.mxo",
"type" : "mx64" "type" : "iLaX"
} }
], ],
"autosave" : 0, "autosave" : 0,
"styles" : [ { "styles" : [ {
"name" : "rnbodefault", "name" : "rnbodefault",
"default" : { "default" : {
"color" : [ 0.929412, 0.929412, 0.352941, 1.0 ], "fontname" : [ "Lato" ],
"bgfillcolor" : { "bgfillcolor" : {
"type" : "color", "type" : "color",
"color" : [ 0.031372549019608, 0.125490196078431, 0.211764705882353, 1.0 ], "color" : [ 0.031372549019608, 0.125490196078431, 0.211764705882353, 1.0 ],
...@@ -259,12 +309,12 @@ ...@@ -259,12 +309,12 @@
"autogradient" : 0.0 "autogradient" : 0.0
} }
, ,
"fontsize" : [ 12.0 ], "stripecolor" : [ 0.258338063955307, 0.352425158023834, 0.511919498443604, 1.0 ],
"bgcolor" : [ 0.031372549019608, 0.125490196078431, 0.211764705882353, 1.0 ], "bgcolor" : [ 0.031372549019608, 0.125490196078431, 0.211764705882353, 1.0 ],
"accentcolor" : [ 0.343034118413925, 0.506230533123016, 0.86220508813858, 1.0 ], "accentcolor" : [ 0.343034118413925, 0.506230533123016, 0.86220508813858, 1.0 ],
"elementcolor" : [ 0.357540726661682, 0.515565991401672, 0.861786782741547, 1.0 ], "fontsize" : [ 12.0 ],
"stripecolor" : [ 0.258338063955307, 0.352425158023834, 0.511919498443604, 1.0 ], "color" : [ 0.929412, 0.929412, 0.352941, 1.0 ],
"fontname" : [ "Lato" ] "elementcolor" : [ 0.357540726661682, 0.515565991401672, 0.861786782741547, 1.0 ]
} }
, ,
"parentstyle" : "", "parentstyle" : "",
...@@ -273,8 +323,10 @@ ...@@ -273,8 +323,10 @@
, { , {
"name" : "rnbohighcontrast", "name" : "rnbohighcontrast",
"default" : { "default" : {
"clearcolor" : [ 1.0, 1.0, 1.0, 0.0 ], "selectioncolor" : [ 0.301960784313725, 0.694117647058824, 0.949019607843137, 1.0 ],
"color" : [ 1.0, 0.874509803921569, 0.141176470588235, 1.0 ], "textcolor_inverse" : [ 1.0, 1.0, 1.0, 1.0 ],
"locked_bgcolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ],
"textcolor" : [ 1.0, 1.0, 1.0, 1.0 ],
"bgfillcolor" : { "bgfillcolor" : {
"type" : "color", "type" : "color",
"color" : [ 0.0, 0.0, 0.0, 1.0 ], "color" : [ 0.0, 0.0, 0.0, 1.0 ],
...@@ -285,16 +337,14 @@ ...@@ -285,16 +337,14 @@
"autogradient" : 0.0 "autogradient" : 0.0
} }
, ,
"selectioncolor" : [ 0.301960784313725, 0.694117647058824, 0.949019607843137, 1.0 ], "editing_bgcolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ],
"textcolor" : [ 1.0, 1.0, 1.0, 1.0 ], "stripecolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ],
"fontsize" : [ 13.0 ],
"locked_bgcolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ],
"bgcolor" : [ 0.0, 0.0, 0.0, 1.0 ], "bgcolor" : [ 0.0, 0.0, 0.0, 1.0 ],
"clearcolor" : [ 1.0, 1.0, 1.0, 0.0 ],
"accentcolor" : [ 0.666666666666667, 0.666666666666667, 0.666666666666667, 1.0 ], "accentcolor" : [ 0.666666666666667, 0.666666666666667, 0.666666666666667, 1.0 ],
"elementcolor" : [ 0.223386004567146, 0.254748553037643, 0.998085916042328, 1.0 ], "fontsize" : [ 13.0 ],
"stripecolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ], "color" : [ 1.0, 0.874509803921569, 0.141176470588235, 1.0 ],
"editing_bgcolor" : [ 0.258823529411765, 0.258823529411765, 0.258823529411765, 1.0 ], "elementcolor" : [ 0.223386004567146, 0.254748553037643, 0.998085916042328, 1.0 ]
"textcolor_inverse" : [ 1.0, 1.0, 1.0, 1.0 ]
} }
, ,
"parentstyle" : "", "parentstyle" : "",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment