# PPR やろうとしていること 任意のファイルパスを指定して、ボタンを押したらテキストが出力される ![](https://hackmd.io/_uploads/HJOYxvGH3.png) コードを1から構築しているのではなく[PProPanel](https://github.com/Adobe-CEP/Samples/tree/5490c33ac8355ba394c693deb10414553b0a5685/PProPanel)のコードを元に不要なものを削って、必要な要素を記述していこうとしています 現状アプローチとして考えているのは2パターンです - [PProPanel/jsx/PPRO/Premiere.jsx](https://github.com/Adobe-CEP/Samples/blob/5490c33ac8355ba394c693deb10414553b0a5685/PProPanel/jsx/PPRO/Premiere.jsx)内にfunction記述する方法 - [PProPanel/index.html](https://github.com/Adobe-CEP/Samples/blob/5490c33ac8355ba394c693deb10414553b0a5685/PProPanel/index.html)にscriptタグを記述してfunctionを定義する方法 ```javascript= var file = new File("D:/myFile.txt"); file.open("w"); file.write("Hello, Premiere Pro!"); file.close(); ``` 現状は`PProPanel/jsx/PPRO/Premiere.jsx`内にfunction記述する方法を検討中で Premiere.jsx内に上のコードを書いて実行すればテキストを出力することができることは把握しましたが`File(path)`の部分にinputタグの入力値を参照するがわからないという状況です HTML内に記述する方法はざっくりこんな感じなのはわかったのですがsaveTextFileが正しく動作しないので記述がそもそもあっているのかは確認している途中です ```htmlembedded= <!-- index.html --> <html> <body> <input type="text" id="myInput"> <button onclick="saveInput()">Save</button> <script src="./lib/CSInterface.js"></script> <script> var csInterface = new CSInterface(); function saveInput() { var inputValue = "test"; var filePath = document.getElementById('myInput').value; csInterface.evalScript(`saveTextFile("${filePath}", "${inputValue}")`, function(result) { console.log(result); }); } </script> </body> </html> ```