idleberg / vscode-applescript

Language syntax and snippets for AppleScript
https://marketplace.visualstudio.com/items?itemName=idleberg.applescript
MIT License
70 stars 8 forks source link

Stop a script #29

Closed Rolias closed 1 year ago

Rolias commented 2 years ago

This extension is great, thank you for writing it. The one thing I wish it had was a Stop Script button like Apple's script editor. I was doing repeat until and sometimes things would hang up. A trip to the Activity Monitor allowed me to kill the wayward process but a stop button would have been a welcome convenience. It would also be nice to have indentation formatting support but I get the feeling that is probably a much bigger deal.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 14 days.

idleberg commented 2 years ago

As far as I can tell, this should be possible. However, I don't think it's possible to differentiate the process, so a stop button would kill all osascript/osacompile processes launched by the extension.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] commented 2 years ago

This issue was closed because it has been stalled for 14 days with no activity.

github-actions[bot] commented 2 years ago

This issue was closed because it has been stalled for 14 days with no activity.

github-actions[bot] commented 2 years ago

This issue was closed because it has been stalled for 14 days with no activity.

idleberg commented 2 years ago

However, I don't think it's possible to differentiate the process, so a stop button would kill all osascript/osacompile processes launched by the extension.

It might actually possible, since spawned processes have a unique ID

Jopp-gh commented 2 years ago

+1 for this request Vscode is a much better environment to develop a variety of code

idleberg commented 1 year ago

There's a new branch feature/kill-process in which I'm testing this feature. While killing the process works, the UX is far from satisfying.

I went for a message dialog, but these can't be closed programmatically (by design) 😞

The other option I'm thinking about is a global button near the existing buttons at the top right. The downside of this is that you'd have to select the process you want to terminate, even though I guess most people only run one.

Any thoughts?

idleberg commented 1 year ago

Updated the branch to use a quick pick dialog

idleberg commented 1 year ago

Feature added in v0.23