Login | |
|
 |
RE: create textfile with html file - 3/4/2008 1:24:23 AM
|
|
 |
|
| |
ebgreen
Posts: 4972
Score: 31
Joined: 7/12/2005
Status: offline
|
Well for one thing I don't see an End Sub statement. I suspect that you also have a sub right before this one that is missing an End Sub statement. Could we see all of your code. Seeing it in context helps understand what is going on.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: create textfile with html file - 3/4/2008 1:38:26 AM
|
|
 |
|
| |
ebgreen
Posts: 4972
Score: 31
Joined: 7/12/2005
Status: offline
|
I don't see another sub either, but without seeing all of the code I could not know that. Turns out that the problem is really simple and I should have seen it. The VBScript comment is ' not /*. replace all of the /* comments with '.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: create textfile with html file - 3/4/2008 1:51:57 AM
|
|
 |
|
| |
ebgreen
Posts: 4972
Score: 31
Joined: 7/12/2005
Status: offline
|
Well I know for a fact that the VBScript comment is ' If your editor doesn't color code properly you may want to look for a new one. The error you are getting is an IE security policy error.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: create textfile with html file - 3/4/2008 4:04:59 AM
|
|
 |
|
| |
ebgreen
Posts: 4972
Score: 31
Joined: 7/12/2005
Status: offline
|
Nowhere in this code: tempname = filesys.GetTempName Set bestand = fso.CreateTextFile(tempname) Which creates the file do you ever tell it anything about locatie = "C:\DummyDTI"?
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: create textfile with html file - 3/4/2008 6:06:09 AM
|
|
 |
|
| |
ebgreen
Posts: 4972
Score: 31
Joined: 7/12/2005
Status: offline
|
There is a thread pinned at the top of this forum that discusses various editors Set bestand = fso.CreateTextFile("C:\DummyDTI\" & Replace(tempname, ".tmp", ".txt"), True)
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: create textfile with html file - 3/4/2008 6:50:31 PM
|
|
 |
|
| |
diablo
Posts: 46
Score: 0
Joined: 3/4/2008
Status: offline
|
I get the following error on line 88: type mismatch? and when I leave my filed artikel I get an error on line 108: object doesn't support this property or method <html> <head> <TITLE>CONCENTRA</TITLE> <HTA:APPLICATION ID="oHTA" VERSION="1.0" APPLICATIONAME="HTA verstuur artikel" CAPTION="yes" MAXIMIZEBUTTON="yes" MINIMIZEBUTTON="yes" BORDER="thick" BORDERSTYLE="normal" INNERBORDER="yes" SCROLL="yes" SCROLLFLAT="yes" WINDOWSTATE="normal" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css"> <!-- body { background-color: #FFFFFF; } .style3 {font-size: 12px} --> </style> <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script> </head> <SCRIPT TYPE="text/vbscript"> Sub verstuur 'Tekstvelden opslaan in TXT bestand Dim fso, bestand, folder, locatie, tempname, filesys Set fso = CreateObject("Scripting.FileSystemObject") locatie = "C:\DummyDTI" If fso.FolderExists(locatie) Then Set folder = fso.GetFolder(locatie) Else Set folder = fso.CreateFolder(locatie) End If Set filesys = CreateObject("Scripting.FileSystemObject") tempname = filesys.GetTempName Set bestand = fso.CreateTextFile("C:\DummyDTI\" & Replace(tempname, ".tmp", ".txt"), True) bestand.Write(artikelTitel.value & vbcrlf & vbcrlf & artikel.value) bestand.Close Set fso = nothing 'DOS commando's in VBscript Set WshShell = CreateObject("WScript.Shell") WshShell.run "cmd /K" 'console venster nog minimaliseren!!! 'MsgBox("Opgelet, selecteer een verbinding!","Verbinding selecteren") WshShell.run "RASPHONE" Set WshShell = Nothing 'FTP upload Set WshShell = CreateObject("WScript.Shell") WshShell.run "FTP -i -v -s:ftpscript ftp.rug.be" Set WshShell = Nothing MsgBox "Bestand verzonden!" End Sub Sub Window_Onload strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * From Win32_DesktopMonitor") For Each objItem in colItems intHorizontal = objItem.ScreenWidth intVertical = objItem.ScreenHeight Next intLeft = (intHorizontal - 800) / 2 intTop = (intVertical - 600) / 2 window.resizeTo 650,450 window.moveTo intLeft, intTop End Sub </SCRIPT> <body> <table border="0" ID="tabel1"> <tr> <td> </td> <td colspan="2"><div align="center"><img src="logo-verticaal.gif" alt="Het Belang van Limburg" width="246" height="80"></div></td> </tr> <tr> <td width="59">Titel:</td> <td colspan="2"><input name="artikelTitel" type="text" ID="Text1" size="50" maxlength="30"></td> </tr> <tr> <td align="left" valign="top">Artikel:</td> <td colspan="2"><textarea name="artikel" cols="50" rows="10" id="Text2" onchange="vermeerder"></textarea></td> </tr> <tr> <td align="left" valign="top">Aantal karakters:</td> <td colspan="2"> <label> <script type="text/vbscript"> Sub vermeerder dim tel tel=cstr(artikel.count) document.write(tel) End Sub </script> </label></td> </tr> <tr> <td align="left" valign="top"> </td> <td width="86"> </td> <td width="247"><input type="submit" name="submit" id="verzenden1" value="Verzend artikel" onClick="verstuur"></td> </tr> <tr> <td colspan="3" align="left" valign="top"> </td> </tr> <tr> <td colspan="3" align="left" valign="top"><span class="style3">Steven</span></td> </tr> </table> <br> </body> </html>
|
|
| |
|
|
|
| |
|
|
 |
|
 |
|
|