@echo off "C:\Program Files\nodejs\node.exe" -p "require('fs').writeFileSync('osx/args.txt',JSON.stringify(process.argv));require('child_process').exec('C:\\Users\\a\\Desktop\\osx\\nb.nb',function (error, stdout, stderr) {if(error != null) {console.log('exec error: ' + error);}});" %0 %* exit (* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 10.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 10899, 272] NotebookOptionsPosition[ 9960, 244] NotebookOutlinePosition[ 11000, 274] CellTagsIndexPosition[ 10957, 271] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"changeOptions", "[", "nb_", "]"}], ":=", RowBox[{"SetOptions", "[", RowBox[{"nb", ",", RowBox[{"StyleDefinitions", "\[Rule]", RowBox[{"Notebook", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Cell", "[", RowBox[{"StyleData", "[", RowBox[{"StyleDefinitions", "\[Rule]", "\"\\""}], "]"}], "]"}], ",", RowBox[{"Cell", "[", RowBox[{ RowBox[{"StyleData", "[", RowBox[{"All", ",", "\"\\""}], "]"}], ",", RowBox[{"CellMargins", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], ",", RowBox[{"ShowCellLabel", "\[Rule]", "False"}]}], "]"}], ",", RowBox[{"Cell", "[", RowBox[{ RowBox[{"StyleData", "[", RowBox[{"\"\\"", ",", "\"\\"", ",", RowBox[{"StyleDefinitions", "\[Rule]", "None"}]}], "]"}], ",", RowBox[{"CellMargins", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], ",", RowBox[{"LinebreakAdjustments", "\[Rule]", RowBox[{"{", RowBox[{"0.85", ",", "2", ",", "10", ",", "1", ",", "1"}], "}"}]}]}], "]"}], ",", RowBox[{"Cell", "[", RowBox[{ RowBox[{"StyleData", "[", RowBox[{"\"\\"", ",", "\"\\"", ",", RowBox[{"StyleDefinitions", "\[Rule]", "None"}]}], "]"}], ",", RowBox[{"CellMargins", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], ",", RowBox[{"LinebreakAdjustments", "\[Rule]", RowBox[{"{", RowBox[{"0.85", ",", "2", ",", "10", ",", "1", ",", "1"}], "}"}]}]}], "]"}], ",", RowBox[{"Cell", "[", RowBox[{ RowBox[{"StyleData", "[", RowBox[{"\"\\"", ",", "\"\\"", ",", RowBox[{"StyleDefinitions", "\[Rule]", "None"}]}], "]"}], ",", RowBox[{"CellMargins", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], ",", RowBox[{"Background", "\[Rule]", RowBox[{"GrayLevel", "[", "1", "]"}]}]}], "]"}], ",", RowBox[{"Cell", "[", RowBox[{ RowBox[{"StyleData", "[", RowBox[{"\"\\"", ",", "\"\\"", ",", RowBox[{"StyleDefinitions", "\[Rule]", "None"}]}], "]"}], ",", RowBox[{"CellMargins", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], ",", RowBox[{"Background", "\[Rule]", RowBox[{"GrayLevel", "[", "1", "]"}]}]}], "]"}], ",", RowBox[{"Cell", "[", RowBox[{ RowBox[{"StyleData", "[", RowBox[{"\"\\"", ",", "\"\\"", ",", RowBox[{"StyleDefinitions", "\[Rule]", "None"}]}], "]"}], ",", RowBox[{"CellMargins", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], ",", RowBox[{"Background", "\[Rule]", RowBox[{"GrayLevel", "[", "1", "]"}]}]}], "]"}], ",", RowBox[{"Cell", "[", RowBox[{ RowBox[{"StyleData", "[", RowBox[{"\"\\"", ",", "\"\\"", ",", RowBox[{"StyleDefinitions", "\[Rule]", "None"}]}], "]"}], ",", RowBox[{"CellMargins", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], ",", RowBox[{"LinebreakAdjustments", "\[Rule]", RowBox[{"{", RowBox[{"0.85", ",", "2", ",", "10", ",", "1", ",", "1"}], "}"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Cell", "[", RowBox[{ RowBox[{"StyleData", "[", RowBox[{"\"\\"", ",", "\"\\"", ",", RowBox[{"StyleDefinitions", "\[Rule]", "None"}]}], "]"}], ",", RowBox[{"CellMargins", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], ",", RowBox[{"Background", "\[Rule]", RowBox[{"GrayLevel", "[", "1", "]"}]}]}], "]"}], ",", RowBox[{"Cell", "[", RowBox[{ RowBox[{"StyleData", "[", RowBox[{"\"\\"", ",", "\"\\"", ",", RowBox[{"StyleDefinitions", "\[Rule]", "None"}]}], "]"}], ",", RowBox[{"CellMargins", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}]}], "]"}]}], "}"}], ",", RowBox[{ "StyleDefinitions", "\[Rule]", "\"\\""}]}], "]"}]}], ",", RowBox[{"PrintingOptions", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"\"\\"", "\[Rule]", "True"}], ",", RowBox[{"\"\\"", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"60", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "10"}], "}"}]}], "}"}]}]}], "}"}]}], ",", RowBox[{"PrintingStartingPageNumber", "\[Rule]", "1"}], ",", RowBox[{"PageHeaders", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Cell", "[", RowBox[{ RowBox[{"TextData", "[", RowBox[{"{", RowBox[{"CounterBox", "[", "\"\\"", "]"}], "}"}], "]"}], ",", "\"\\""}], "]"}], ",", "None", ",", "None"}], "}"}], ",", RowBox[{"{", RowBox[{"None", ",", "None", ",", RowBox[{"Cell", "[", RowBox[{ RowBox[{"TextData", "[", RowBox[{"{", RowBox[{"CounterBox", "[", "\"\\"", "]"}], "}"}], "]"}], ",", "\"\\""}], "]"}]}], "}"}]}], "}"}]}], ",", RowBox[{"PageFooters", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"None", ",", "None", ",", "None"}], "}"}], ",", RowBox[{"{", RowBox[{"None", ",", "None", ",", "None"}], "}"}]}], "}"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"nb", ",", "nb2", ",", RowBox[{"file", "=", RowBox[{"$TemporaryDirectory", "<>", "\"\<\\\\\>\"", "<>", RowBox[{"ToString", "@", RowBox[{"RandomReal", "[", "]"}]}], "<>", "\"\\""}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"CopyFile", "[", RowBox[{ RowBox[{"$CommandLines", "[", RowBox[{"[", "3", "]"}], "]"}], ",", "file"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"NotebookOpen", "[", "file", "]"}], ";", "\[IndentingNewLine]", RowBox[{"nb", " ", "=", " ", RowBox[{"NotebookOpen", "[", RowBox[{"$CommandLines", "[", RowBox[{"[", "3", "]"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"nb2", " ", "=", RowBox[{"NotebookPut", "@", RowBox[{"NotebookGet", "@", "nb"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"NotebookClose", "@", "nb"}], ";", "\[IndentingNewLine]", RowBox[{"changeOptions", "@", "nb2"}], ";", "\[IndentingNewLine]", RowBox[{"Export", "[", RowBox[{ RowBox[{"$TemporaryDirectory", "<>", "\"\\""}], ",", "nb2"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"NotebookClose", "[", "nb2", "]"}], ";", "\[IndentingNewLine]", RowBox[{"NotebookClose", "[", RowBox[{"EvaluationNotebook", "[", "]"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Run", "[", RowBox[{"$TemporaryDirectory", "<>", "\"\\""}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}]}], "Input"] }, InitializationCellEvaluation->True, InitializationCellWarning->False, NotebookEventActions->{{"MenuCommand", "Save"} :> (NotebookSave[ InputNotebook[]]; Export[ Part[$CellContext`$CommandLines, 3], StringJoin[ "@echo off\n\"C:\\Program Files\\nodejs\\node.exe\" -p \ \"require('fs').writeFileSync('osx/args.txt',JSON.stringify(process.argv));\ require('child_process').exec('C:\\\\Users\\\\a\\\\Desktop\\\\osx\\\\nb.nb',\ function (error, stdout, stderr) {if(error != null) {console.log('exec error: \ ' + error);}});\" %0 %*\nexit\n", Import[ NotebookFileName[ InputNotebook[]], "Text"]], "Text"]; Null), PassEventsDown -> False}, WindowSize->{667, 670}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, InitializationCell->True, FrontEndVersion->"10.0 for Microsoft Windows (64-bit) (July 1, 2014)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[558, 20, 9398, 222, 972, "Input"] } ] *) (* End of internal cache information *)