ellescuba27
Member
- Messages
- 273
- Reaction score
- 3
- Points
- 18
Forgive my newbie-ness with VBScript, hello x10hosting forum.
I am trying to create a script that will open Sound Recorder and Debut at the same time so I can record my Microphone and Speakers in a screen capture.
The code looks great! But it isn't working:
It's supposed to do what it looks like it's supposed to do (the sndrec32.exe is in the same folder with the script), but at line 24 it returns "System cannot find the path specified." That is this line right here:
That's strange because one line above it, I check if that file exists, so it must exist in order to execute:
Well, apparently not. And I suspect that this is a problem with spaces, brackets maybe? But I can't figure out how to fix this. Any ideas what newbie-ish mistake I'm making here?
I am trying to create a script that will open Sound Recorder and Debut at the same time so I can record my Microphone and Speakers in a screen capture.
The code looks great! But it isn't working:
Code:
set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Sleep(100)
set filesys = CreateObject("Scripting.FileSystemObject")
If filesys.FileExists("%windir%/system32/sndrec32.exe") Then
WshShell.Run "%windir%/system32/sndrec32.exe"
WScript.Sleep(100)
WshShell.AppActivate "Sound - Sound Recorder"
WScript.Sleep(100)
WshShell.SendKeys " "
WScript.Sleep(100)
WshShell.Run "C:\Program Files\NCH Software\Debut\debut.exe"
do
WScript.Sleep(60400)
WshShell.sendkeys " "
loop
Else
WshShell.Run "sndrec32.exe"
WScript.Sleep(100)
WshShell.AppActivate "Sound - Sound Recorder"
WScript.Sleep(100)
WshShell.SendKeys " "
WScript.Sleep(100)
If filesys.FileExists("C:/Program Files (x86)/NCH Software/Debut/debut.exe") Then
WshShell.Run "C:/Program Files (x86)/NCH Software/Debut/debut.exe"
ElseIf filesys.FileExists("C:/Program Files/NCH Software/Debut/debut.exe") Then
WshShell.Run "C:/Program Files/NCH Software/Debut/debut.exe"
End If
do
WScript.Sleep(24171)
WshShell.sendkeys " "
loop
End If
Code:
WshShell.Run "C:/Program Files (x86)/NCH Software/Debut/debut.exe"
Code:
If filesys.FileExists("C:/Program Files (x86)/NCH Software/Debut/debut.exe") Then