It’s been noted there is no AppleScript solution.
Welcome to programming, figuring out how to accomplish things.
You can call a Shell Script from AppleScript.
If your not willing to download and use code for
Other folks or write your own code , and then figure out how to use that from AppleScript your not gonna get anywhere!!!