Open drjlevi6 opened 11 months ago
The last time I checked, opening binary files in VSCod was not possible. Thanks to your issue, I did some research on whether that has changed and it turns out, it's possible. This was the only feature that prevented this extension from going 1.0, so I hope find some time to implement it.
Thank you for your response. I might add that since my first post, I've tried out your Run commands for AppleScript and JXA files, and find that the commands do indeed work. FWIW
Thank you again for this extension. jl
You can test support for decompiling binary AppleScript files (.scpt
) in the latest main
-branch. Unfortunately, it appears that they can only be viewed in a custom editor which doesn't support editing or syntax highlighting. An improvement from the current state, but far from ideal. Let me know what you think!
Forgive my ignorance, but how do I upgrade AppleScript to the new main
branch?
I should add that if I need to edit the script, I can still use the Script Editor from the VSCode command line, i.e.,
open -a 'Script Editor' myScript.scpt
Would still be an advantage to having to do this just to view the script.
Forgive my ignorance, but how do I upgrade AppleScript to the new
main
branch?
I've created this package to spare you the process of getting NodeJS to build it.
https://wormhole.app/KQqyQ#SEm1uS1dNo7OuL7md5V7ag
To install it, run code --inspect-extensions applescript-cf32809.vsix
on the command-line (I'm not sure if there's a GUI equivalent)
Good morning—I visited , downloaded applescript-cf32809.vsix
to my Downloads folder and ran code --inspect-extensions /Users/jonathan/Downloads/applescript-cf32809.vsix
in both VSCode's terminal and Terminal.app, but got no output.
As far as I can see, your newest main
branch's version is still 0.42.3; I was expecting 2.5.0.
I hope you won't mind if I experiment (privately) with your extension. I've visited VSCode's tutorial ; I hope I may ask you for help if I have questions. Thank you once again, Jonathan
I was a bit quick releasing a new version. It looks like it's actually possible to add write support for .scpt files.
OK, v 25.0 is now installed. It displays my JXA scripts nicely (I have titled them all with filenames like myScript.jxa.scpt) but I no longer see output when I run the JXA: Run Script command from the Command Palette. If I use osadecompile (in the command line) todecompile script helloWorld.jxa.scpt to helloWorld.jxa.applescript, I get a nicely syntax-checked version of the text file; I can run JXA: Run Script successfully. BTW: If you wish to test my file, here's the source: / Say "Hello World!" in a display dialog Usage: run the script / const app = Application.currentApplication();app.includeStandardAdditions = true; app.activate();app.displayDialog("Hello world!", {withTitle: "Hello!", withIcon: 1, buttons: "OK", defaultButton: "OK"});
Jonathan
On Friday, September 8, 2023 at 02:15:17 AM EDT, Jan T. Sott ***@***.***> wrote:
Forgive my ignorance, but how do I upgrade AppleScript to the new main branch?
I've created this package to spare you the process of getting NodeJS to build it.
https://wormhole.app/KQqyQ#SEm1uS1dNo7OuL7md5V7ag
To install it, run code --inspect-extensions applescript-cf32809.vsix on the command-line (I'm not sure if there's a GUI equivalent)
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
AppleScript V0.25.0 compiles .applescript files, but the JXA: Run Script command doesn't seem to run .scpt files.
On Friday, September 8, 2023 at 01:36:15 PM EDT, Jan T. Sott ***@***.***> wrote:
I was a bit quick releasing a new version. It looks like it's actually possible to add write support for .scpt files.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
My mistake. v0.25.0 does indeed run JXAs. Sorry!
On Friday, September 8, 2023 at 01:36:15 PM EDT, Jan T. Sott ***@***.***> wrote:
I was a bit quick releasing a new version. It looks like it's actually possible to add write support for .scpt files.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
I'm running into this issue too, trying to use AppleScript in Code. Using the latest 0.25.0 and ApplleScript 2.8 on MacOS Sonoma
You can test support for decompiling binary AppleScript files (
.scpt
) in the latestmain
-branch. Unfortunately, it appears that they can only be viewed in a custom editor which doesn't support editing or syntax highlighting. An improvement from the current state, but far from ideal. Let me know what you think!
Hi. I've been using .scpt as an extension on my test AppleScripts. 0.25 interprets these that ends up in the custom editor without editing or syntax highlighting. Is there a way to check if the .scpt file is binary before interpreting it?
Or do I just need to rename everything .applescript Didn't realize .scpt was assumed to be a binary. :)
Downgrading to 0.24.3 got me back to the way it was before. Others might try downgrading and seeing fi they have a problem still. On the extenstion listing clip the arrow in the Uninstall button and select "Install Another Version..."
I downgraded also.
On Friday, October 6, 2023 at 05:53:35 PM EDT, Bryan Gebhardt ***@***.***> wrote:
You can test support for decompiling binary AppleScript files (.scpt) in the latest main-branch. Unfortunately, it appears that they can only be viewed in a custom editor which doesn't support editing or syntax highlighting. An improvement from the current state, but far from ideal. Let me know what you think!
Hi. I've been using .scpt as an extension on my test AppleScripts. 0.25 interprets these that ends up in the custom editor without editing or syntax highlighting. Is there a way to check if the .scpt file is binary before interpreting it?
Or do I just need to rename everything .applescript Didn't realize .scpt was assumed to be a binary. :)
Downgrading to 0.24.3 got me back to the way it was before. Others might try downgrading and seeing fi they have a problem still. On the extenstion listing clip the arrow in the Uninstall button and select "Install Another Version..."
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
I installed the AppleScript extension, but when I try to open a .scpt file, AppleScript is not listed as a choice. Any suggestions?