Here is another option, with prompt for the length in the middle of the command:
Call Rhino.Command("_Line _BothSides _Pause _NoEcho -RunScript (" & chr(13) & "Dim r : r=Rhino.GetReal(""Line length?"") : if not isnull(r) then Rhino.SendKeystrokes(Cstr(r/2))" & chr(13) & ")")
Note if you want to skip typing the number, just hit Enter or RMB to pick the distance by mouse;
Also, if you need another option like Perpendicular etc. you would need to modify the above by either adding another _Pause after the first _Pause or the actual option like _Perpendicular etc.