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.

 syntax error

Author Message
Kaan Acar
  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 3/16/2005
  • Location:
syntax error - Wednesday, March 16, 2005 1:37 AM
0
<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:
Re: syntax error - Saturday, March 26, 2005 6:53 AM
0
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:
Re: syntax error - Monday, March 28, 2005 1:43 PM
0
What exactly is the error message and at what line ?