Skip to content

Instantly share code, notes, and snippets.

@KEINOS
Last active December 7, 2016 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KEINOS/39e3a6ea6e05b81b0c355f23ea751a92 to your computer and use it in GitHub Desktop.
Save KEINOS/39e3a6ea6e05b81b0c355f23ea751a92 to your computer and use it in GitHub Desktop.
List of VBScript samples for WSH that worked in Wine @ Wineskin Winery

List

WSH Scripts below worked with Wine @ Wineskin winery.

  • Echo.vbs
  • Open_notepad.vbs
  • ReadFileAndConvertStrToUppercase.vbs

Reference

'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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment