from time import sleep
import autoit

autoit.send("#r")
autoit.win_wait_active("Run")
autoit.send("gpedit.msc {ENTER}")
autoit.win_wait_active("Group Policy Object Editor")
autoit.send("{DOWN 8}")
autoit.send("{RIGHT}")
autoit.send("{DOWN}")
autoit.send("{RIGHT}")
autoit.send("{DOWN 3}")
autoit.send("{RIGHT}")
autoit.send("{DOWN 4}")
autoit.send("{RIGHT}")
autoit.send("{DOWN}")
autoit.send("{RIGHT}")
autoit.send("{DOWN 10}")
sleep(1)
autoit.send("{TAB}")
autoit.send("{DOWN 45}")
autoit.send("{Enter}")
autoit.win_wait_active("Allow active scripting Properties")
autoit.control_command("Allow active scripting Properties", "Button2", "Check")
sleep(0.5)
autoit.control_command( "Allow active scripting Properties", "Button8", "Check")
sleep(0.5)
autoit.control_command( "Allow active scripting Properties", "Button6", "Check")
sleep(0.5)
autoit.win_close("Group Policy Object Editor")
