2nd: how do I get the time from VLC running in a normal window on a PC programmatically?
3rd: Is it possible to start a lua extension from the command line? (maybe something like vlc.exe test.mp4 --extraintf myAwesomeLuaStartupScript)
2nd: Use an interface to access get_var("time") or equivalent.
3rd: Only if it is an interface script.
---
There have been various changes to VLC over the years, so some things which used to work either need to be modified or are just no longer possible. Importantly, many functions have been limited to only work with interface scripts and so no longer work with regular scripts. Similarly, some functionality has been limited to non-Windows operating systems as they were buggy on Windows. See
http://www.videolan.org/developers/vlc/share/lua/ for the readmes and existing interface scripts which you can use as reference.
My understanding is that there is no way to "auto-start" a regular script from the standard version of VLC. However, you can tell VLC to load an interface. For example, for a LUA interface script use --extraintf=luaintf --lua-intf=YOURINTERFACENAME (and put the interface file in %ProgramFiles%\VideoLAN\VLC\lua\intf\, etc).
You might be able to use vlc.msg.info(get_var("time")) and send the information via a pipe. To avoid problems you would need to use the --no-quiet command-line switch (to ensure the message gets through) and you might want to check if vlc.object.input() exists (so you don't try and get the time if there is no file open).
One option is to write code to work with an existing VLC LUA or non-LUA interface. For the Syncplay interface script I get the current time through get_var("time") and then pass it to the launching Python script via a socket created through vlc.net.listen_tcp. See:
https://raw2.github.com/Uriziel/syncpla ... ncplay.lua