Looks like you posted this in the wrong forum. You are not asking for help with AutoHotkey.
Probably you should post this in the "Other Utilities & Resources" section, since this is a hybrid AutoHotkey mixed with Python utility.
https://www.autohotkey.com/boards/viewforum.php?f=22