Changes in Spectrum 2.4

These are the new and changed script commands since version 2.1 of Spectrum.

Return to Spectrum Info Page



FUNDAMENTAL COMMANDS

Clear Clipboard
Clears the Clipboard of any content. An empty Clipboard can speed up the operation of some script commands.

Open Help [Subject [Topic [TargetString]]]
Close Help
Opens and Closes the !Help! NDA, and if the optional Subject, Topic, TargetString are specified, will attempt to scroll to that position.

Set FKey Menu Value MenuValue
Value is a number from 1-51
MenuValue is a number from 0-9
Assigns specific menu items to an FKey instead of the usual "String". This allows those menu items to be fired as easily as if they had a Key Equivalent. The file transfer items are probably the most useful items that can be assigned.

OS UTILITIES

Copy File "
SourcePath" "TargetPath" [Value]
Value = 1 copies data fork
Value = 2 copies resource fork
Value = 3 copies both forks
Using the optional Value, you can now copy either the data fork, resource fork, or both forks. In all cases, the target file must already exist, or an error will be generated. The resource fork will be created if needed.

JudgeName "FoldernameFilename" VarName
Expands the FoldernameFilename and parses it to suit the FST of the destination volume pointed at by Foldername.

Get Multifile "PromptString" Value ScriptEditor
Value = 0 Any file
Value = 1 Text only
Value = 2 Text, AppleWorks, Teach
Value = 3 Launchable Applications
Value = 4 Text and Teach
ScriptEditor is a value from 0-9
This complements the "Get File" command. It is primarily intended for use by the "Send Batch" commands.

Get FileInfo2 "Path" VarName
Complements the "Get FileInfo" command, but returns the LongYear instead of the two digit short year. This makes the command Y2K compliant.


READING CATALOGS

Read Catalog2 CatalogNumber VarName
Complements the "Read Catalog" command, but returns the LongYear instead of the two digit short year. This makes the command Y2K compliant.


SCREEN APPEARANCE

Set ScreenBypass Value
Value can be On or Off
Controls whether data is sent to the screen or not. If set to 'Off', it allows script execution to continue with a closed screen. Note that this is not the same as "Set Screen Off" as the "WaitFor" and "Trigger" commands will still operate. Effectively it operates as though a screen was open, but with no data showing on screen.

Show Window "String"
Opens a dialog style window and displays the "String" in LETextBox format. This window complements the new commands for "Set ScreenBypass".

Close Window
Closes the window opened by "Show Window".

Set XferStatus Value
Value can be On or Off
Controls whether the Protocol Transfer Status box is shown or not during a transfer.

SCRIPT INTERPRETATION

Set Replacement <char>
Changes the value normally used for the "$" substitution character.


SCRIPT & PROGRAM CONTROL

Chain "Path" [Label]
Chainbacks can now be nested to 16 levels. This allows much more flexible use of the "Chain' command, as using shorter scripts will speed script execution.

POP Chainback
POP All Chainback
These commands "pop" or remove one or all of the Chainback levels.


TCP/IP SETTINGS

Switch TCP/IP
TCPConnect
TCPDisconnect
Flush TCPSendBuffer
Open TCPSocket
"address" Mode VarName
Close TCPSocket SocketNum
Get TCPStatus SocketNum VarName
Get TCPData "LineEndMarkerString" VarName [Socket]
Get TCPEditor "LineEndMarkerString" EditorNumber [Socket]
Send TCPData "String" [Socket]
Send TCPEditor EditorNumber [Socket]
Set TCPActiveSocket SocketNum [Mode]
Set TCPClosedResponse SocketNum "String"
Set TCPMessages Value
Value can be On or Off
Set TCPNotify Value
Value can be On or Off
Get TCPEntry Value VarName
Value is a number from 1 to size of Services list
Set TCPFlushChar Value
Set TCPEOLTranslation [Value1 [Value2]]
Set TCPFlushFrequency Value
These commands all complement the support for the Marinetti(tm) TCP/IP Control Panel. They are fully described in the "TCP/IP Settings" !Help! screen.

TRANSFERRING FILES

Send File ZBatch "File1" ["File2"] ["File3"] etc.
Send File ZBatch
ScriptEditor
Send File YBatch "File1" ["File2"] ["File3"] etc.
Send File YBatch
ScriptEditor
File is the path to a file or a file in the Send file folder
ScriptEditor is a value from 0-9
Batch sends files. These commands replace the functionality of the BatchXfer XCMD.


VARIABLE REPLACEMENT ITEMS

$DisplayOpen
Gets replaced by ON or OFF depending on whether the current online display is open or closed.

$FileID#
Gets replaced by the GS/OS ID of an open file. The returned value cannot be used within any script commands. It is intended for use by XCMDs that can support the direct handling of an open file.

$Date2
Gets replaced by the date using the LongYear value.

$DateTimeStamp2
Gets replaced by the date/time string using the LongYear value.

$Year2
This is the same as $LongYear.

$ChainLevel
Gets replaced by the current level in the Chainback sequence. The returned value will be from 0-16.

$Signature
Gets replaced by the Signature string if it has been defined.

$BufferSize
$ScrollSize
$PortSize
Gets replaced by the size of the defined buffers. Note that this is the maximum size of the buffer, not the size of its contents.

$Buffer
Gets replaced by the size of the contents of the capture buffer. Note that this is a change from previous versions of Spectrum.

$BufferSaved
Gets replaced by a NULL if the buffer has been saved, or a '1' if not. Use this in conjunction with the $BufferDirty variable.

$TCPOnline
$TCPInstalled
$TCPActive
$TCPError
$TCPIPID
$SerialActive
$ActiveSocket
$FreeSockets
$TCPConnectMethod
$TCPConnectName
$TCPMessages
$TCPMode
$TCPNotify
$IPAddress
$EOLChar1
$EOLChar2
$FlushChar
$FlushFrequency
These substitutions all complement support for the Marinetti(tm) TCP/IP Control Panel. They are fully described in the "Replacement Item" topic in the Spectrum Scripting !Help! screens.


ADVANCED COMMANDS

Compile Script "
SourcePath" "TargetPath"
Optimises a script by converting the commands into tokens, and removing any white space and REM statements. This can speed up the execution of some scripts by a factor of two.

Set Cursor Value
Value = 6

Stops the automatic control of the Cursor by Spectrum. Use in conjunction with the existing "Set Cursor" values to force a particular cursor.

Freeze Cursor
Unfreeze Cursor or Melt Cursor
Hides and disables the Cursor. This is the same effect as you get while downloading files. The cursor will be restored when the script stops.

Set KeyTranslation Value
Value can be "None" or "Standard"
By default, KeyTranslation is set to "None" while the online display is open. This script command overrides that setting.

Set Signature "String"
Assigns a string that will be inserted into any open TextEdit control by the OA-T key command.

Drop DTR [Value]
Value is a number from 1-60
Drops the DTR line to the modem for the given number of seconds. Without the optional value, defaults to 2 seconds.

Reboot
Similar to Shut Down, but reboots the system instead of just shutting down.


Return to Spectrum Info Page


Page prepared by Ewen Wannop.
To contact me, please leave me a message in the Apple2 Forum on A2Central.