WSH Scripts below worked with Wine @ Wineskin winery.
- Echo.vbs
- Open_notepad.vbs
- ReadFileAndConvertStrToUppercase.vbs
- Very good document on VBScript and WSH
Microsoft Windows 2000 Scripting Guide
WSH Scripts below worked with Wine @ Wineskin winery.
| 'Simple message dialog pops up in wine | |
| WScript.Echo "hello world." |
| 'Opens notepad app after the dialog is closed | |
| Set objShell = WScript.CreateObject("WScript.Shell") | |
| WScript.Echo "Notepad.exe will lounch." | |
| objShell.Run "notepad.exe" | |
| 'Sample VBS file that converts text to uppercase letters | |
| 'in lowercase.txt and export to uppercase.txt. | |
| Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") | |
| Const ForReading = 1, ForWriting = 2, ForAppending = 8 | |
| Set objInput = objFSO.OpenTextFile("lowercase.txt", ForReading) | |
| Set objOutput = objFSO.OpenTextFile("uppercase.txt", ForWriting, True) | |
| Do Until objInput.AtEndOfStream | |
| strLine = objInput.ReadLine | |
| objOutput.WriteLine UCase(strLine) | |
| Loop | |
| objInput.Close | |
| objOutput.Close |