John's Corner

Sample Scripts

Below are a selection of scripts that demonstrate how to use Script's programming language. This gives an idea of the capabilities of Script and the types of programming and automation tasks it is suited for. All files are included in the downloadable Script zip file. Click on the script name to view the source file.

Alarm A simple alarm clock that alerts at a settable time and date.
Uses time and date entry boxes to set time and date to play an alarm in .wav format.
Assoc Lists all the file associations registered on your computer.
Uses script registry commands to find and display the associations in a script console.
CardTrick A simple card trick.
Uses script picbox to display pictures of cards.
Chime Plays a single chime every quarter hour and chimes the time on the hour.
Uses script tray commands to store the user menu in the system tray.
CLI A script command line interpreter for experimenting.
Uses script execute to run entered command.
Clock A simple large clock display.
Uses a script banner to display the time.
CmdPromptHere Adds a Command Prompt to the right click context menu.
Uses script registry commands to access keys in the registry.
CmdPrompt Adds a Command Prompt to the SendTo menu.
Alternative that passes directory name as a parameter.
Compile A script to compile scripts into a stand alone executable.
Uses the filebox command to select the script to compile.
Computername Displays the computer name.
Uses scripts windows information commands
Date Displays the current date.
Uses script banner and delay commands to display for a preset time.
DelayOff Sets a delayed time and date to turn off PC.
Uses script tray, timebox, datebox and suspend to turn off at set time.
Dice A very simple dice program - one dice.
Uses script banner, random and msgbox to generate and display dice value.
DiceA A dice program, selectable from 1 to 5 dice.
Uses script banner, menubox, random and msgbox.
DiceB A dice program, selectable from 1 to 5 dice.
A more compact version with less code duplication.
DiceC A dice program, selectable from 1 to 5 dice.
An optimised version with no code duplication.
DirList Displays a list of files for a given directory.
Uses script dirbox to select the directory to list.
EditFile A simple front-end for notepad.
Uses script filebox to prompt for file to edit.
EditReminders A front-end for notepad to edit reminder file.
See reminder script below.
Eject Scans for all ejectable drives and prompts to eject media.
Uses script finddisk and disktype to scan and determine ejectable drives.
FileDate Select a file and change last written date - a souped up UNIX touch.
Uses various script user boxes and setftd to prompt for file and set date.
GetTemp Display current temperature in Melbourne.
Uses script geturl to get Bureau of Meteorology web page and extract temp.
GetURL Download and store the contents of a URL from the net.
Uses script geturl.
InsanityTest A bit of fun - no claim to originality.
Uses script picbox and play to display a picture and play a sound file.
IPinfo Display all IP addresses configured on your PC.
Uses script registry commands to extract from registry.
LineBr Add <BR> to end of each line in a file.
Simplest conversion to HTML.
LineNum Prepends line numbers to each line in a file.
Uses script readline and savetext to add line numbers.
ListFiles Creates a listing of file names in a folder.
Uses dos command and parameter passing of folder to list.
LockPC Lock your PC directly from the system tray.
Uses script lockpc and tray commands.
MemSize Display system memory size.
Uses script memsize and msgbox.
Ping A simple GUI ping command.
Uses script ipbox and ping to input IP address and perform ping.
PingChk Monitor ping a set of hosts from the system tray.
Uses script ping and tray commands to ping IP address listed in file.
PingScan A ping scanner between specified IP addresses.
Uses script ipbox and ping to input IP addresses and perform pings.
Poweroff Shutdown PC and power off.
Uses script poweroff - PC must have advanced power management.
Reminder A simple reminder system for use at startup.
Uses script readline and msgbox to check dates and display today's reminders.
Route A GUI front end for the DOS ROUTE command.
Uses script dos to run ROUTE and infobox to display routes.
RunMsc Lists and runs available snap-ins for the Microsoft System Console.
Uses script list box to get snap-ins from system directory.
Screensave Directly activate configured screen saver.
Uses script screensave - must have a screen saver set in display properties.
SetTime Reads timeserver via http, extracts time and sets system time, accurate to a few seconds.
Uses script geturl and set time.
ShowEnv Show list of environment variables.
Uses command with set and console with quit flag and idle.
ShutTask Show list of tasks with services.
Uses command with tasklist and console with wait flag.
Shutdown Shutdown PC.
Uses script shutdown.
Subst A GUI front end for the DOS SUBST command.
Uses script start to run SUBST and console to display results.
SysInfo Display system information.
Uses a range of script windows information commands.
TempMon Monitor current temperature in Melbourne, updated every 15 mins, in system tray.
Uses script geturl to get Bureau of Meteorology web page and extract temp.
TestPat Display a TV test pattern in selectable size.
Uses a script menubox and picbox to select and display bitmap.
Touch Touch a file with a new time and date.
Uses parameter passing from command line and setftd command. prompt.
TrayCmd Access Command window from system tray.
Uses script start, menu and puttray to access DOS Command prompt.
Version Display script version.
Uses script version and msgbox commands.
ViewFont A simple front-end for the windows Fontview command.
Uses a script filebox, preset to Fonts directory.
WinVersion Display windows version.
Uses script windows version commands.

Return to Front Page

John's Corner