Aqueum Posted June 18, 2022 Share Posted June 18, 2022 Is there any way to make Scripter work with an external code editor? I'd like to use Visual Studio Code rather than the basic Script Editor in Logic. Unfortunately, in my tests, even changing a single digit in Visual Studio Code renders the .pst file unreadable by Scripter in Logic. Quote Link to comment Share on other sites More sharing options...
David Nahmani Posted June 18, 2022 Share Posted June 18, 2022 The easiest way is to copy and paste your code from your editor to Scripter. 2 Quote Link to comment Share on other sites More sharing options...
Aqueum Posted June 18, 2022 Author Share Posted June 18, 2022 (edited) Thanks David Good answer, although the ⌘A ⌘C swipe click ⌘A ⌘V could get tiring pretty rapidly. I'll see if I can find a way to automate copying all and pasting to Scripter while simultaneously saving and committing to GitHub in Visual Studio Code. Edited June 18, 2022 by Aqueum fixing typo Quote Link to comment Share on other sites More sharing options...
David Nahmani Posted June 18, 2022 Share Posted June 18, 2022 I wonder if your original problem comes from using the wrong type of data type (ASCII or binary)? I remember this being an issue for me in the past when downloading files from a server and uploading them to another, and it no longer worked because the wrong type of data type was selected in FileZila (https://wiki.filezilla-project.org/Data_Type). 1 Quote Link to comment Share on other sites More sharing options...
Aqueum Posted June 18, 2022 Author Share Posted June 18, 2022 Yes, I suspect that is the case - Visual Studio Code doesn't want to open the file initially because it's either binary or uses unsupported text encoding. When you force it to open it shows a lot of null characters in the header before the code. I guess Visual Studio Code is then unable to save the binary correctly after you change even one character. Quote Link to comment Share on other sites More sharing options...
David Nahmani Posted June 18, 2022 Share Posted June 18, 2022 Just now, Aqueum said: Yes, I suspect that is the case - Visual Studio Code doesn't want to open the file initially because it's either binary or uses unsupported text encoding. When you force it to open it shows a lot of null characters in the header before the code. I guess Visual Studio Code is then unable to save the binary correctly after you change even one character. Yes I know I've had this issue when trying to edit some of the plist files included inside Logic's package with BB Edit, it would just kill the files and make them unuseable. I thought I could just undo my edit and resave the file but the new file would just make Logic crash. I've had to reinstall Logic once because of this! 1 Quote Link to comment Share on other sites More sharing options...
Aqueum Posted June 18, 2022 Author Share Posted June 18, 2022 11 minutes ago, David Nahmani said: I've had to reinstall Logic once because of this! Fortunately for me it's just refusing to open the file. Do Apple read the Feature suggestions here: https://www.logicprohelp.com/forums/forum/15-feature-suggestions/ or are we better leaving feedback at: https://www.apple.com/feedback/finalcutpro/ Quote Link to comment Share on other sites More sharing options...
David Nahmani Posted June 18, 2022 Share Posted June 18, 2022 10 minutes ago, Aqueum said: Do Apple read the Feature suggestions here: https://www.logicprohelp.com/forums/forum/15-feature-suggestions/ or are we better leaving feedback at: https://www.apple.com/feedback/finalcutpro/ Neither. Instead, you can post them here: https://www.logicprohelp.com/forums/forum/15-feature-suggestions/ (I know they read them) and there: https://www.apple.com/feedback/logic-pro.html (which goes straight to the Logic Pro team), and again I know they read them. 1 Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted June 18, 2022 Share Posted June 18, 2022 Yes pst files are binary. Copy and paste is the only way, just get used to doing that. the Pst file format is not just for scripter, it is a general purpose plugin preset format. The scripter pst files contain not only the script itself but information about the plugin version and other binary data regarding plugin parameter values, etc. In order to edit a binary file you need a binary editor and you have to have knowledge about the exact structure of the file, which we don’t have. ASCII text editors will simply munge just about any binary file you try to mess with and anyway if you don’t know the proper structure the text will look like jibberish in a text editor. you can always ask apple to separate the script text to a separate file rather then embed it into the generic pst file which all logicpro plugins use to save presets, but I doubt they would do so as it would become much more complicated to keep synchronized. 1 1 Quote Link to comment Share on other sites More sharing options...
Aqueum Posted June 18, 2022 Author Share Posted June 18, 2022 Thanks @Dewdman42 yes I have added a feature request here and via https://www.apple.com/feedback/logic-pro.html - I did consider suggesting saving scripts as .js but, for the reasons you give, didn't try to tell them how to implement. I tried automating the ⌘A ⌘C swipe click ⌘A ⌘V with automator but no joy so far. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted June 18, 2022 Share Posted June 18, 2022 AppleScript might be worth a try. 2 Quote Link to comment Share on other sites More sharing options...
des99 Posted June 18, 2022 Share Posted June 18, 2022 (edited) I’d probably do this with Keyboard Maestro - set up a hot key trigger to copy the current text in my text editor, then bring up Logic and paste it into the script editor, so it’s just a single key press to update the contexts of the scripter… I’ve done similar things for other stuff (like Kontakt scripting, which has a similar workflow…) Edited June 18, 2022 by des99 3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.