syntax error

Author Message
Kaan Acar

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 3/16/2005
  • Location:
  • Status: offline
syntax error - Wednesday, March 16, 2005 1:37 AM ( #1 )
<SCRIPT language='VBScript'>
Dim obj
set obj = CreateObject(\"UEKAE.Download\")
Call obj.DownloadFile()
set obj = Nothing
DownloadFile = 0
If Err.Number = 424
Then MsgBox \"Sistemde ba?vurunuz.\", 16, \"Uyary\"
else
window.location=\"c:/NewFolder/xxx.doc\"
end If
</SCRIPT>


i got this script this script is working but i want to add some code this script. but when i execute this script i got a syntax error. Please help me to find out what is going wrong


<SCRIPT language='VBScript'>
Dim obj
set obj = CreateObject(\"UEKAE.Download\")
Call obj.DownloadFile()
set obj = Nothing
DownloadFile = 0
If Err.Number = 424
Then MsgBox \"Error\", 16, \"Uyary\"
else
Dim obj1
set obj1 = CreateObject(\"UEKAE.Crypto\")
Call obj1.DecryptFileWithoutMenu()
set obj1 = Nothing
DecryptFile = 0
If Err.Number = 424
Then MsgBox \"Error.\", 16, \"Uyary\"
else
window.location=\"c:/NewFolder/xxx.doc\"
end If
end If
</SCRIPT>
didorno

  • Total Posts : 361
  • Scores: 0
  • Reward points : 0
  • Joined: 2/12/2005
  • Location:
  • Status: offline
Re: syntax error - Saturday, March 26, 2005 6:53 AM ( #2 )
Kaan Acar, The If statements need a correction, I think the
syntax is
If condition Then
Thing1
Else
Thing2
End If

so 'Then' must be on the same line as 'If'.
If you try the vbscript part on its own, as a .vbs file, then you get
the error message.
token

  • Total Posts : 1917
  • Scores: 0
  • Reward points : 0
  • Joined: 1/14/2005
  • Location:
  • Status: offline
Re: syntax error - Monday, March 28, 2005 1:43 PM ( #3 )
What exactly is the error message and at what line ?


After experiencing a lot of down time, We decided to move this site to CrystalTech.com. CrystalTech.com is powered by only the finest Windows servers providing the best performance, reliability, and value anywhere.
Jump to:

Current active users
There are 0 members and 1 guests.
Icon Legend and Permission
  • 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
  • Read Message
  • Post New Thread
  • Reply to message
  • Post New Poll
  • Submit Vote
  • Post reward post
  • Delete my own posts
  • Delete my own threads
  • Rate post

© 2000-2009 ASPPlayground.NET Forum Version 3.6