Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


syntax error

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,59944
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> syntax error
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 syntax error - 5/7/2008 3:43:27 PM   
  the_apostle21


Posts: 46
Score: 0
Joined: 7/29/2005
Status: offline
Hi,

can someone please assist.  This is probably easy, but for the life of me, i cannot get the syntax right - i keep getting an "Expected end of statement" error.

i am trying to use the bmailer utility, which is probably irrelevant, but below is the syntax.  Can someone point me in the right direction? 

sCmd = "bmail.exe -s orion -t to@email.com.au -f from@email.com.au -a "Process missing from Server " & strServer & " - " & strProcess & "" -b "This is the body""

Let me know if you need the full code.

Thanks in advance.
 
 
Post #: 1
 
 RE: syntax error - 5/7/2008 4:00:48 PM   
  dm_4ever


Posts: 2174
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
WScript.Echo is your friend....see if this is what you're after...

sCmd = "bmail.exe -s orion -t to@email.com.au -f from@email.com.au -a ""Process missing from Server " & strServer & " - " & strProcess & """ -b ""This is the body"""
WScript.Echo sCmd

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to the_apostle21)
 
 
Post #: 2
 
 RE: syntax error - 5/7/2008 4:34:09 PM   
  the_apostle21


Posts: 46
Score: 0
Joined: 7/29/2005
Status: offline
Hi dm_4ever,

i tried that.  It doesnt run the code.  even if i put in "on error resume next" it still throws the error.

I assume there is a quotation mark in the wrong place or missing, but i cannot find where.

thanks

(in reply to dm_4ever)
 
 
Post #: 3
 
 RE: syntax error - 5/7/2008 4:57:11 PM   
  ehvbs

 

Posts: 2012
Score: 48
Joined: 6/22/2005
From: Germany
Status: offline
Hi the_apostle21,

perhaps this

  http://www.visualbasicscript.com/fb.aspx?m=59828

will give you a starting point.

BTW: To put "On Error Resume Next" into a non working script and hoping to get
better results is like trying to drive your car with closed eyes into your garage,
because you had hit the wall every time when your eyes were open.

Regards

ehvbs

(in reply to the_apostle21)
 
 
Post #: 4
 
 RE: syntax error - 5/7/2008 5:37:04 PM   
  the_apostle21


Posts: 46
Score: 0
Joined: 7/29/2005
Status: offline
Hi ehvbs,

That helped!!  i should have realised, but the error was pointing to the column where the error was occuring.  a few tried later and i had it.

Thanks for your help guys!!

P.S. ehvbs - I understand what you mean about the "on error resume next", but i was actually using it to try get the script to parse so i could echo the line to see what the command looked like...but it didnt help!!

Cheers

(in reply to ehvbs)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> syntax error Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts