04-23-2023, 10:58 PM
To get straight to the point, I've never dealt with Basic and JavaScript, but I can think of a few thoughts.
Why JS and not VisuelBasic Script, today, WSH(Windows Scripting Host)? It's probably included automatically, or you can download it.
WSH is object-oriented, and it's a form of Basic. So why you playing away when temptation is right in front of you?
I don't know if I've already posted this, but this is a very simple WSH program (it's been a while since I've made web pages with VBS or WSH). My first web scripting language was VisualBasic Script, and I still think it was better than JS. Is it really better than WSH today?
The program creates a folder under Windows and deletes it after 5 seconds without asking. Here H\:
Why JS and not VisuelBasic Script, today, WSH(Windows Scripting Host)? It's probably included automatically, or you can download it.
WSH is object-oriented, and it's a form of Basic. So why you playing away when temptation is right in front of you?
I don't know if I've already posted this, but this is a very simple WSH program (it's been a while since I've made web pages with VBS or WSH). My first web scripting language was VisualBasic Script, and I still think it was better than JS. Is it really better than WSH today?
The program creates a folder under Windows and deletes it after 5 seconds without asking. Here H\:
Code: (Select All)
'Variablendeklaration erzwingen
Option Explicit
Dim Pfad, OrdnerAnzeigen
Dim fso, fo
'Ordner Beispiel erstellen
Pfad = "H:\TEMP\Beispiel"
'FileSystemObject erzeugen fuer Zugriff
Set fso = WScript.CreateObject("Scripting.FileSystemObject")
'Ordner erstellen
Set fo = fso.CreateFolder(Pfad)
'Neu erstellten Ordner anzeigen
OrdnerAnzeigen = fso.GetParentFolderName(Pfad)
Set fo = fso.GetFolder(OrdnerAnzeigen)
'5 Sekunden warten
WScript.Sleep 5000
'Ordner ohne Nachfrage loeschen
fso.DeleteFolder(Pfad)
WScript.Quit
'***Ende