'Apple Script - How to move a window to a specific virtual workspace(desktop)

enter image description here

I would like to open 2 different Visual Studio Code windows and Move 1 to Desktop 2 and the second window to Desktop 3 using AppleScript.

Any help on this would be amazing. Thank you !



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source