Why don't you look at the line that the error message
told you the error is on, and then post it here? No one
can help you figure out what character is invalid if
they can't see your code. :)
Usually that error will mean that you used something
invalid in the context. A non alphanumeric in a variable
or an operator that can't work might do it. Though
WSH will try to force an operator to work if it can.
For instance:
i = 2
s = 3
msgbox i & s
I tried that out thinking that it might result in an
invalid character error, but instead the interpreter
converted the numbers to strings and the msgbox
showed "23"!
"mayayana" <mayaX...@rcXXn.com> wrote in message
news:#9yRHq0o...@TK2MSFTNGP05.phx.gbl...
A google search for "800A0408" finds info such as these:
"If you cut and paste code from other sources (e.g. web sites, other
editors, etc) you often bring along characters that don't show up in Notepad
but are, nonetheless, present -- or do appear as non-prinatable characters,
that look like little squares. If you're looking at the line in question and
it isn't simply an unclosed string or a premature carriage return, try
deleting the line(s) altogether and re-typing them by hand. This should
eliminate the possibility of 'invisible' problem characters mucking up the
stream."
(http://classicasp.aspfaq.com/general/why-do-i-get-800a0408-errors.html).
"Your VBScript contains an illegal character, often at the beginning of a
line. It can happen if you copy the script from word, then paste into
notepad. For example, to 'Rem out a line we need the apostrophe, which is
ASCII character 39; however if you paste from word you may get ASCII 96
(Grave accent)."
(http://www.computerperformance.co.uk/Logon/code/code_800A0408.htm)
It seems to me that the problem is not with either editor, but with editing
with both.
/Al
So I edited my vb-file so it started with an empty line, and then run the following command line
for /f "skip=1 tokens=*" %i in (not_working.vbs) do @echo %i >>will_work.txt
And the crappy characters was gone and the script engine accepted it.
/kryppa
>> On Monday, February 01, 2010 9:28 AM mayayana wrote:
>> Why do not you look at the line that the error message
>> told you the error is on, and then post it here? No one
>> can help you figure out what character is invalid if
>> they cannot see your code. :)
>>
>> Usually that error will mean that you used something
>> invalid in the context. A non alphanumeric in a variable
>> or an operator that cannot work might do it. Though
>> WSH will try to force an operator to work if it can.
>> For instance:
>>
>> i = 2
>> s = 3
>> msgbox i & s
>>
>> I tried that out thinking that it might result in an
>> invalid character error, but instead the interpreter
>> converted the numbers to strings and the msgbox
>> showed "23"!
>>> On Wednesday, February 03, 2010 1:54 AM Al Dunbar wrote:
>>> A google search for "800A0408" finds info such as these:
>>>
>>> "If you cut and paste code from other sources (e.g. web sites, other
>>> editors, etc) you often bring along characters that do not show up in Notepad
>>> but are, nonetheless, present -- or do appear as non-prinatable characters,
>>> that look like little squares. If you are looking at the line in question and
>>> it is not simply an unclosed string or a premature carriage return, try
>>> deleting the line(s) altogether and re-typing them by hand. This should
>>> eliminate the possibility of 'invisible' problem characters mucking up the
>>> stream."
>>> (http://classicasp.aspfaq.com/general/why-do-i-get-800a0408-errors.html).
>>>
>>> "Your VBScript contains an illegal character, often at the beginning of a
>>> line. It can happen if you copy the script from word, then paste into
>>> notepad. For example, to 'Rem out a line we need the apostrophe, which is
>>> ASCII character 39; however if you paste from word you may get ASCII 96
>>> (Grave accent)."
>>> (http://www.computerperformance.co.uk/Logon/code/code_800A0408.htm)
>>>
>>> It seems to me that the problem is not with either editor, but with editing
>>> with both.
>>>
>>> /Al
>>>> On Monday, November 29, 2010 8:40 AM kryppa wrote:
>>>> I got the same problem, and I had some crap characters in the beginning of my vb-file that I couldn't see in Notepad, but when i run the file through the TYPE command.
>>>>
>>>>
>>>>
>>>> So I edited my vb-file so it started with an empty line, and then run the following command line
>>>>
>>>>
>>>>
>>>> for /f "skip=1 tokens=*" %i in (not_working.vbs) do @echo %i >>will_work.txt
>>>>
>>>>
>>>>
>>>> And the crappy characters was gone and the script engine accepted it.
>>>>
>>>>
>>>>
>>>> /kryppa
>>>> Submitted via EggHeadCafe
>>>> AJAX ModalPopUpExtender with GridView (Database) With Clientside Validation.
>>>> http://www.eggheadcafe.com/tutorials/aspnet/fee775bd-2c63-402e-b473-b7ee68a5a340/ajax-modalpopupextender-with-gridview-database-with-clientside-validation.aspx
So I edited my vb-file so it started with an empty line, and then run the following command line
for /f "skip=1 tokens=*" %i in (not_working.vbs) do @echo %i >>will_work.txt
And the crappy characters was gone and the script engine accepted it.
/kryppa
> On Monday, February 01, 2010 5:21 AM AuHuman wrote:
>>> Submitted via EggHeadCafe
>>> OAuth Basics for .NET Developers
>>> http://www.eggheadcafe.com/tutorials/aspnet/16beeea4-4332-4d23-8433-ade0ae6dbcbd/oauth-basics-for-net-developers.aspx
It sounds like you might be saving the file in Unicode.
|
| for /f "skip=1 tokens=*" %i in (not_working.vbs) do @echo %i
>>will_work.txt
|
Whatever that means...(DOS?) ...it's not VBScript.
You need to get a real news reader and stop going
to online forums. The online forums are just parasite
websites that repost Usenet posts as their own
content. The post you're responding to is almost
a year old!