Closed pimpeters closed 6 months ago
Second this, that would be sweeeeet.
Would love to get a PR on this, but not sure what Electron provides as far as scriptability is concerned.
Any news on this?
Update: So unfortunately, Electron does not support AppleScript, so I am afraid that the solution below is the only thing we have.
So I've been playing around with this, and so far, I have this (excuse the tab indentation):
on runTest(_command)
tell application "Hyper" to activate
tell application "System Events"
repeat until exists window 1 of process "Hyper"
delay 0.1
end repeat
keystroke "k" using {command down}
keystroke "u" using {control down}
keystroke _command
keystroke return
end tell
end runTest
on run argv
set _command to item 1 of argv
runTest(_command)
end run
This waits for Hyper to open before it attempts to run any commands, but the problem is that it requires you to allow Sublime to "control your computer," which is not ideal. I tried to make it work with the current solution for iTerm with no success
If anybody here has more experience with AppleScript, we can make this a PR in no time.
Is there going to be any support for Hyper? Seems like iTerm and Terminal are the only useable terminals at this moment.