Windows 음성 인식 매크로를 작성하려고합니다. 아래 코드를 참조하십시오. 실행시 플레이어는 "D : MusikMedia \ Song1.mp3 not found"를 반환합니다. 즉, 백 슬래시가 제거됩니다. oShell.run에서 인수 자체를 사용하여 경로를 지정하려고했지만 동일한 오류를 반환합니다. 그러나 볼 수 있듯이 오디오 파일 이름 바로 앞에 슬래시가 있습니다. 그리고 공백은 파일 이름에도 그대로 유지됩니다. 그러나 경로와 동일한 지 알지 못합니다. 어쨌든 나는이 일을 할 수 있니? 또는 VBScript에서 어떻게 완료되었는지 보여줄 수 있습니까?백 슬래시가 누락 되었습니까? - JScript 또는 VBScript
또한 system32 폴더에 설치되거나 D : \ KMPlayer.exe 또는 드라이브 내부 (드라이브 내부의 폴더가 아닌)에 설치되는 경우 프로그램을 실행할 수있는 이상한 문제가 있습니다. E : \ KMPlayer.exe. 경로가 E : \ Softwares \ KMPlayer \ KMPlayer.exe 인 경우에는 열리지 않습니다. 그럼, 도와 줘? :)
<?xml version="1.0" encoding="UTF-16"?>
<speechMacros>
<command>
<listenFor>Play [file]</listenFor>
<setTextFeedback speak="true">Playing {[file]}</setTextFeedback>
<script language="JScript">
<![CDATA[
var oShell = new ActiveXObject("WScript.Shell");
oShell.Run('"D:\KMPlayer.exe" "{[file.fileName]}"');
]]>
</script>
</command>
<fileNames name = "file" propname = "fileName" directory="D:\Media\Musik\" includeSubdirectories="true"/>
</speechMacros>
고마워요! :)
이 내 도움말에 http :. // 블로그 .technet.com/b/heyscriptingguy/archive/2004/08/06/how-can-i-use-file-names-as-parameters.aspx – david
['] (http://archive.msdn.microsoft.com/wsrmacros/Wiki/View.aspx?title=run&referringTitle=Executors) 요소 대신 스크립트를 사용하여 e 프로그램을 종료 하시겠습니까? –
경로가 오류와 일치하지 않습니다. 이것이 당신의 테스트 케이스라고 확신합니까? –