How to list all handler applications for URL scheme?

For example this objective-c code lists all applications that can open https, can i do the same using applescript?

No, you can’t do it directly from AppleScript. You’d need to add an Objective-C class with code similar to that you posted, and call it from your script.