I'm new to applescript and I'd like some help with something I'd like to create. I've searched around on the internet and found a few pages, [here][1] and [here][2], that describe pretty much what I would like to do, but I don't completely understand it.

I'd like to make an application that closes everything on the computer (not required), opens 4 desktops, first one with google chrome open, third with iMovie open, and fourth with textedit open.

Can anyone make a code that can do this? It would be greatly appreciated!


  [1]: https://superuser.com/questions/649240/opening-apps-with-automator-to-a-specific-desktop-osx
  [2]: https://www.lifewire.com/automate-opening-applications-and-folders-on-mac-2260908