1.

Solve : NOTEPAD PROBLEM, PLEASE HELP!!!?

Answer»

I want to create a BAT file in Notepad that would automatically create a VBS file ( with command msgbox"blabla" , voice command, etc ) in a folder that i choose, by COPY CON command...
I tried this code>>>
cd c:\
cd users
cd %userprofile%
cd desktop
copy con hello.vbs
msgbox"Bla!"

but it doesn't make file, it only opens CMD and goes to >>> copy con hello.vbs <<< then pauses and waits for me to type in what I want to be in VBS file...
Please help...quickly if not a problem...Quote

copy con hello.vbs
Does just what you asked it to do.

Are you using voice recognition software inside of notepad?
Please explain.I'm not using ANYTHING...I want to make a bat file that will create vbs file automatically,but the problem is that it runs cmd and stops at COPY CON,WITHOUT making a file...Quote from: AMS on June 28, 2010, 03:30:39 PM
it runs cmd and stops at COPY CON,without making a file...

That is normal. CON is the keyboard INPUT stream. When the batch "stops" it is WAITING for you to TYPE msgbox.vbs (with your fingers) and then do CTRL-Z then ENTER.

You are doing this the wrong way. This is how a batch file would do it:

Code: [Select]echo msgbox "Bla!">hello.vbs


Tnx, a lot!Just one more question, how can I enter a new line for that vbs? For example,if I want to enter command

StrText="thank you"
set ObjVoice=CreateObject("SAPI.SpVoice")




ObjVoice.Speak StrText


> creates/overwrites
>> appends

echo StrText="thank you">my.vbs
set ObjVoice=CreateObject("SAPI.SpVoice")>>my.vbs



Discussion

No Comment Found