Lexikos/AutoHotkey_L — pull request #31 by fincs (2014-09-13 15:48:39+00:00)
Title: Add /RunStdIn

I took your invitation.

- New switch: `/RunStdIn`, which loads the script from stdin.
- stdin scripts default to `#SingleInstance Off` and `#NoEnv` (since it makes no sense to limit the number of simultaneous dynamic scripts to 1 and `#NoEnv` is boilerplate present in almost all scripts which would hinder dynamic execution of one-line scripts).
- FileOpen() now supports opening stdin/out/err (actually a side-effect of implementing stdin support in TextIO.cpp but which I expanded anyway due to convenience):
- `FileOpen("*", "r")` for stdin
- `FileOpen("*", "w")` for stdout
- `FileOpen("**", "w")` for stderr
- Doubt: Currently BOMs are handled for the standard streams too. Maybe this should be changed (i.e. ignore automatic BOM writing for `FileOpen("*", "w", "UTF-8")`).

As always, I may have broken something. Please let me know in that case.