Accuterm Escape Sequences
Supported by MacWise
(version 12.05 or later)
MacWise supports some of the special escape sequences used by the Accuterm PC terminal emulator.
1. Save and Restore Screens
Many host computers are programmed to instruct the client app to save and restore screens.
MacWise supports three sets of escape sequences commonly used by PC clients, Including Accuterm.
If your host is already programmed to display pictures using Accuterm escape sequences, you may not have to change the host programming at all. Just mount the network drive containing your pictures on your Mac using the Finder's Go Menu. (See "MOUNTING A WINDOWS PC DRIVE TO ACCESS YOUR PICTURES").
You can display pictures from the web with MacWise version 12.4.4 or later.
Picture formats supported include:
jpeg, tiff, png, gif, jp2, pict, bmp, qtif, psd, pdf, sgi, and tga
NOTE: Pictures cannot be used as a background picture because text will be hidden behind the picture.
If you want to do some host programming to display pictures, follow these guidelines:
ESC STX iL , filename , col , row , width , height , aspect, border CR
Displays the image file, "filename" at column "col" and row "row".
Columns and rows are based upon character positions (not pixels).
Height and width are optional; if specified (and not zero), the image is scaled to "height" rows and "width" columns. Otherwise, the original image size is used.
If aspect is non- zero, the image aspect ratio is preserved (the specified width or height is reduced to preserve the aspect ratio).
N for no border,
B for simple border,
R for raised border or
I for inset border style.
Note: MacWise only supports the B (simple) border.
Images are considered “protected” data.
A “clear un-protected characters” command will not clear images from the terminal
WEB FILE NAMES
MacWise will get the picture from the web if the address begins with http
For instance, a valid filename would be http://www.macwise.com/MacWise-Screen.jpg
(Requires MacWise version 12.4.4 or later).
PC FILE NAME PATHS
To maintain compatibility with PC's on the network, it is best to use DOS file name paths in your host programming. Then the same programming will work for PC's running Accuterm and Macs running MacWise.
DOS file names use backslashes to separate folders.
For instance your path might look like C:\MyPicturefolder\MyPicture.jpg
MOUNTING A WINDOWS PC DRIVE TO ACCESS YOUR PICTURES
You can also access a Windows PC over the network to retrieve your pictures.
Click on the Desktop and then select "Connect to Server" from the Go Menu.
Then use an smb path to mount the PC server.
Then the PC drive "PCDriveName" will be mounted on your Mac Desktop.
When you display a picture from the PC drive on the network, you would use a pathname like this:
MAC FILE NAME PATHS
File names must be complete paths.
You can use Mac filename paths such as VolumeName:MyPicturefolder:MyPicture.jpg
(where VolumeName is the name of the drive).
Mac path names use colons to separate folders.
Pictures can be on your Mac or on a network drive.
If you use "BootVolume" as the Volume Name, MacWise will automatically use the name of your Mac drive.
Basic program to display a picture "MyPicture" using the original size and aspect ratio at row zero and column zero
001 EQU ESC TO CHAR(27), STX TO CHAR(2), CR TO CHAR(13)
002 PRINT ESC:STX:"iL,BootVolume:MyPicture.jpg,0,0,0,0,0,0":CR
ESC STX iD , filename CR
Removes the displayed image file filename from the screen.
ESC STX iC CR
Clears all displayed images from the screen.
3. Download a file from host to Mac as ASCII or Kermit.
Note: you must have Kermit enabled under the MacWise Connection Menu to do Kermit file transfers.
For ASCII downloads, MacWise ignores the file path and stores the downloaded file into your Documents folder in a folder called kermit_transfers as file name ft.txt
ESC STX D p o m ; path CR
Protocol p may be A (ASCII),
Overwrite o may be O (overwrite) or N (no overwrite);
Mode m may be T (text)
or B (binary). Path is the drive, directory and file name of
the file being received. When using Kermit protocol,
only drive and directory need be
specified, as the file name is included in the transfer protocol;
however if the file name is specified here, it overrides the file
name included in the transfer protocol.
Return Status of Last File Transfer
ESC STX S Returns status of last file transfer. Status message is:
Status: s f i l es f bytes b CR
where f is the number of files transferred, b is the number of
bytes transferred, and s is the transfer status:
0 = transfer successful
1 = unable to open file
2 = transfer aborted by operator
3 = file already exists
4 = terminated due to timeout
5 = terminated due to corrupted data
6 = invalid packet type
7 = terminated by remote program
8 = 8 data bits required for protocol
9 = software flow control not allowed for protocol
Downloading File Complete. Stop Download and close file.
ESC STX C X
End capture. The file containing the captured data is closed.
4. Upload a file from Mac to Host as ASCII Text
ESC STX U p m ; path CR
Upload file from Mac to host. Protocol p may be A (ASCII)
Mode m may be T (text)
Path is ignored and assumed to be ~user:Documents:pick
Notes: path must end with a text file having a .txt extension
For instance the following path would work:
MacWise will look in the User's Documents folder for a folder called pick and a file called MyFile.txt
MacWise automatically creates the pick folder. You just need to drag MyFile.txt to the pick folder
before you start your file transfer.
5. 80/132 Column modes
Select 132 Column Mode (MacWise actually supports 156 columns)
ESC STX E Selects extended (132 column) video mode as defined by the
extended columns and rows in the Screen Settings category
in the Settings dialog box.
Select 80 Column Mode
ESC STX N Selects normal (80 column) video mode as defined by the
normal columns and rows in the Screen Settings category in
the Settings dialog box.
6. Launching a web browser url or email ( Also can launch a file on your Mac)
Process URL link for Mail, Web page or file
ESC STX < URL CR
Launches your browser and goes to the URL provided by the host *
Can also launch files on your Mac or send email
Example host program:
NOTE: If the URL does not contain http or mailto, then MacWise attempts to open a document on your Mac. For instance...
PRINT CHAR(27):CHAR(2):"<":"MyFilename" (no path is supplied here so the file would need to be in the MacWise folder.
With MacWise 14.0 or later, if you use "BootVolume" as the MyDrive Name, MacWise will automatically use the name of your Mac drive.
With MacWise 14.0 or later, if you use "UserDesktop" as the MyDrive Name, MacWise will look for the file on the Desktop.
With MacWise 18.0.4 or later, if you use "KermitFolder" as the MyDrive Name, MacWise will look for the file in the user's Documents folder in kermit_transfers
With MacWise 14.0 or later, you can use DOS file names like this...
With MacWise 14.0 or later, slashes are no longer allowed in the file name
NOTE 2: There are no error messages generated if the host has supplied an incorrect command for the URL or file.
ESC CTRL B > URL CR
Same as above
Running a Script from the Host Computer
(MacWise 14.1.5 or later)
To run a script from the host system, send the private AccuTerm command:
ESC STX P script CR
where script is the text of a script to execute. Each script statement is separated by a LF or EM control character, and the entire script is terminated with a CR (carriage return character).
NOTE: MacWise currently only supports the FileExists script as of MacWise version 14.1.5
Examples would be:
NOTE: Accuterm is a trademark of it's respective company and is not associated with Carnation Software.