I'm looking to create an AppleScript which helps me open VSCode in a specific folder (in order to be able to use it in the toolbar in Finder). I've written the following code:
tell application "Finder" if exists Finder window 1 then set currentFolder to target of Finder window 1 as alias else return end if end tell tell application "Visual Studio Code" to open quoted form of POSIX path of currentFolder
However, this isn't working. I've never used AppleScript before, so I'm unaware of what I'm doing wrong.
How could I achieve this?
Thanks in advance for your answer.