My AutoIt script that executes from Windows Task Scheduler under Windows 7 works fine. On my Windows 10 machine with the identical task, instead of running the script, the Task Scheduler loads it into SciTE (an editor that accompanies AutoIt).
When I execute the script from within Explorer it runs. When I execute it from a command line it runs. It's only from Task Scheduler that I get this misbehavior. How do you tell Task Scheduler I want to run the script, not edit it?
If you do not wish to compile it, you can pass the script name to the AutoIt executable. For example:
"C:\Program Files (x86)\AutoIt3\AutoIt3.exe" "C:\Scripts\Test.au3"
This is how it would look in Task Scheduler:
And you can read more about AutoIt command line switches at this online help page.