Jump to content

Scripter - how can you use an External Editor (eg Visual Studio Code)?


Aqueum

Recommended Posts

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.

Link to comment
Share on other sites

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 by Aqueum
fixing typo
Link to comment
Share on other sites

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). 

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

  • Sad 1
Link to comment
Share on other sites

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. 

  • Like 1
Link to comment
Share on other sites

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.  

 

 

  • Like 1
  • Sad 1
Link to comment
Share on other sites

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 by des99
  • Like 3
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...