Version 2.1.4 AppleScripts don't work in 3.0
I'm using iTerm2 3.0.0 on Mac OS 10.11.5. The AppleScript dictionary has changed so that this script no longer works:
tell application "iTerm" tell the current terminal to tell current session to write text "cd /Applications" end tell
I'm trying to support both version 2 and version 3 in Default Folder X (so it can tell the shell in iTerm2 to go to a specific folder) and this is making it rather difficult. Can you give me an AppleScript that'll work in both v2 and v3 for executing a command in the current terminal session? If not, can you fix the AppleScript support in v3 so that's possible?