jonny wrote:
That's because you can only pass parameters to executables, not files that are associated with executables. You have to specify the executable and pass the file as a parameter, which is functionally identical but also allows you to pass the parameter (if the language supports that, in the case of an interpreter). For instance, you couldn't do 'Run script.ahk Param1 Param2', you have to do 'Run AutoHotkey.exe script.ahk Param1 Param2'.
...so I need:
Run wscript C:\Documents\Audio\vbs\speak.vbs "Refresh"
...with my:
Code:
If WScript.Arguments.Count = 0 Then
WScript.Echo "no argument on the command line."
Else
For each arg in WScript.Arguments
WScript.Echo "argument:" & arg
Dim Talk
Set Talk=WScript.CreateObject("SAPI.SpVoice")
Talk.Rate=5
Talk.Speak "" & arg
Next
End If
Yay: it works!
Execute
lots of them
very quickly and I still see errors, though.