Sloup Help

Updated July 1999

Prepared by Peter Rand

What is Sloup?

Sloup is a small (~45k) package which works together with a wide variety of desktop-based terminal emulation programs to allow you to quickly transfer text and data between your Newton and your desktop computer via a serial cable. With Sloup, it's easy to type on the Newton using your desktop keyboard, to transfer email or other text to your desktop for reading or processing, or to copy text items from your desktop into Notepad or NewtWorks documents. Advanced users can use Sloup to transfer entire document folders between the Newton and the desktop, as well as packages and other data types.

How to configure your desktop terminal program

Sloup works together with a wide variety of desktop-based terminal emulation programs -- ZTerm and ClarisWorks for Mac, HyperTerminal for Windows as well as programs for Unix and other platforms.

If you are using one of the above (or similar) desktop terminal emulators, configure it initially as follows:

How do I transfer text from a note, a NewtWorks doc, a NewtonBook or an item in the In/Outbox to my desktop?

The basic procedure is to connect a serial cable between the Newton and the desktop, and then start up Sloup on the Newton and the terminal emulator on your desktop. Now set Sloup to "Keyboard" mode, and highlight the text you would like to send. (Note: in older versions of Sloup, this is called "Inspect" mode). To send the text to your desktop terminal program, simply tap the "Paste" button on the Sloup interface.

A view of the three modes available in Sloup 3 modes

How do I save the text I transfer from the Newton to the desktop via the terminal program?

You have two options: the first is to simply highlight the text in the terminal program, copy it, and then paste it into a word-processing document on your desktop. For longer documents, you may want to configure your terminal program to automatically save the incoming text as a .txt file on your hard disk. In HyperTerminal this is done by selecting "Transmission/Save Text", entering a path and file name, e.g., "C:\downloads\today.txt" and then clicking "Start" to activate the setting. Now when I highlight the text in the Newton and tap the "Paste" button in Sloup, I can see the text appearing in the terminal program on my desktop, and, at the same time, a file named "today.txt" is created on the hard disk which also contains the text. While the exact options will vary from terminal program to terminal program, the basic process should be about the same.

What is "Keyboard" mode?

When Sloup is set to "Keyboard" mode, you can initiate transfers from the Newton to your desktop directly from the Newton by tapping the "Paste" button.

Sloup in Keyboard mode Keyboard mode

In Keyboard mode, Sloup allows you to:

How do I send text from the desktop to the Newton while in "Keyboard" mode?

  1. place the cursor in the Notepad or NewtWorks document where you would like to capture the incoming text
  2. start Sloup
  3. select the option "Keyboard"
  4. run the desktop's terminal emulation program
  5. highlight and copy the text on the desktop (e.g., from a word-processing document or email) that you would like to send to the Newton
  6. open the terminal emulator window, make sure the desktop's cursor is showing in the screen of the terminal emulator
  7. paste in the copied text. Note: you will not see this pasted text on the screen of your desktop (unless you turn on the "local echo" on your desktop)!
  8. press the enter/return key on your desktop
  9. the text will appear in the Newton to the left of where the cursor was located.

How do I use the keyboard pass-thru function?

i.e., use the desktop's keyboard to type on the Newton? I can type on the keyboard, but none of the letters appear in the terminal emulator or in the Newton.

  1. ensure that the cable is connected, Sloup is set to "Keyboard" mode and the terminal emulation program is running
  2. place the cursor where you would like the text to appear in your Newton.
  3. type the words "Greetings Newton!" on your desktop keyboard (note that the words _ will not _ appear on your desktop screen!!)
  4. if the words do not promptly appear at the cursor in the Newton, press the carriage return on your keyboard
  5. the words should then appear in the Newton
  6. just type as you normally would (the text should continue to emerge on the Newton screen, and not on the desktop)
  7. the desktop backspace delete key, depending on the terminal emulator you are using, may not be compatible with Sloup.

What is "Command" mode?

In command mode, once a connection has been established between your desktop and Newton, all of the transfer commands are issued from the desktop terminal emulator. You can also write simple desktop macros and save them as *.txt files to automate the transfer of entire folders of Notepad/NewtWorks documents to the desktop.

A view of Sloup in Command mode Command mode

In Command mode*, Sloup can help you (via simple macros and a terminal emulator on your desktop) to:

*In Command mode, once a connection has been established between your desktop and Newton, all of the transfer commands are issued from the desktop terminal emulator.

What is the difference between "Keyboard" and "Command" modes?

The main difference is that in Keyboard mode, text sent from the desktop to the Newton is treated simply as text. In Command mode, text is interpreted as commands. For example, in Keyboard mode, a text such as "Store mytext.txt in Miscellaneous folder" would appear to the left of the Newton's cursor as "Store mytext.txt in Miscellaneous folder". In Command mode, Sloup would try to interpret this text as a command (unsuccessfully in this case).

How do I save text from the desktop to the Newton while in "Command" mode?

Refer to the section below entitled "Using Sloup in Command mode" for explanations and examples.

How do I use Sloup in Command mode?

In Command mode, you must first create simple "macros" (command files) on your desktop word-processor and save them as ".txt" (or .slp) files. By accessing these macros via the terminal emulator, you can automate the transfer of entire folders of Notepad/NewtWorks documents to the desktop.

What are macros?

Macros are generally short commands stored as .txt files which contain the following information (for Notes):

  1. The name of the target soup to store the data. Common soup names are Notes and NewtWorks
  2. Labels to indicate the name of the folder to be used, which is contained within {curly} braces. If no label is specified ( i.e., {}), the Unfiled folder will be used as the default. If the label contains non-alphanumeric characters (such as a space), you need to wrap the folder name with vertical bars, e.g., {labels: '|News Services!|}. The label {labels: 'Friends} sends text to the folder named "Friends" in Notes using the current default font (or to the folder named "Friends" in NewtWorks if that's the soup you designate).
  3. Class: class indicates the type of note to be used. If no class is specified, the text will be saved as a regular note. For example:
  4. The viewFont: viewFont specifies the font to be used. If no viewFont is specified, the default style settings will be used.

Examples of Command mode macros

For the following examples, make sure that Sloup is in Command mode. (Note: some of these examples are included with the Sloup distribution and documentation)

Example: macro to transfer text from the desktop to Notes

  1. Open a new document in your word-processor. At the top of the document, type in the word "Notes" and enter a carriage return.
  2. Type in curly parentheses: "{}" and enter a carriage return.
  3. Enter the text you would like to save such as: "The quick brown fox jumped over the lazy dog" (by either typing or pasting it in), followed by a carriage return.
  4. Type in the word "BYE!" followed by a carriage return (this is a command text needed by Sloup).
  5. Save the document as a .txt file entitled "fox.txt".

You have just created a macro which should now look like this:

Notes
{}
The quick brown fox jumped over the lazy dog. 
BYE!

Congratulations -- you are now ready to transfer this text to your Newton, where it will be stored in Notes as an Unfiled note.

Make sure that your Newton and desktop are connected by a serial cable. Now open your terminal emulator, and select the options "Transmit/Send data/fox.txt. The text "The quick brown fox jumped over the lazy dog" should now appear in an Unfiled note. All the following example macros are activated via the "Transmit/Send data/macro.txt" command in the desktop terminal emulator.

Example macros

Remember to save each macro as a separate .txt file. The following examples can easily be copied and pasted into your desktop word-processor.

transfer text from desktop into the Untitled folder in Notes

Notes
{}
YOUR TEXT HERE  
BYE!

transfer only plain notes to desktop (Including titles and modification dates)

Notes
{class: 'paperRoll, title: "string", _modTime: "dateTime"}
DUMP!

transfer text from desktop into the Business folder in Notes

Notes
{labels: 'Business}
YOUR TEXT HERE  
BYE!

transfer text from desktop to a folder in Notes named "Business"

Notes
{labels: 'Business, } // default height and font
first paragraph, first line
second line
third line
that's all folks
----------
second paragraph, first line
2nd line
3rd line
4th line
more
more
etc.
end
---------
third para
---------
BYE!

transfer text from desktop to a folder in Notes named "Business" with formatting info

Notes
{labels: 'Business, viewFont: 10241}
YOUR TEXT HERE  
a second line in same paragraph
-----
another para
-----
-----
BYE!

transfer all NewtWorks docs in the folder named "Business" to the desktop

NewtWorks 
{labels: 'Business}
DUMP!

export all Notes in the folder named "Business" to desktop

Notes
{labels: 'Business}
DUMP!

transfer Calendar data to the desktop

Calendar
{viewStationery: 'Meeting, mtgStartDate: "time", mtgDuration: "int",\
mtgText: "rich", mtgStopDate: "time", repeatType: "int", mtgInfo: "int",\
mtgAlarm: "time", mtgIconType: "int",\
mtgInvitees: [{name: {first: "string", last: "string"},}], version: "int",}
DUMP!

transfer InOut Box data from the Newton to the desktop

Outbox
{text: 'string}
DUMP!

export all entries in Outbox to the desktop

Outbox
{name: 'string, toEmailAddress: 'string, fromName: 'string, title: 'string, dateStr: 'string, text: 'string}
DUMP!

erase all entries in Outbox

Outbox
{}
ERASE!   // erases all Outbox entries
BYE!

transfer Names data to the desktop

Names
{name: {first: "string", last: "string"}}
DUMP!

export Names data to desktop

Names
{name: {class: 'person, honorific: "string", first: "string", last: "string", title: "string"}, company: "string", phones: ["homePhone", "workPhone", "beeperPhone", "faxPhone"], email: "string", address: "string", address2: "string", city: "string", region: "string", country: "string", postal_code: "string", bday: "date", cardType: 0, sortOn: "stringWithClass"}
DUMP!

export Names data to desktop

Names
{name: {last: "string",}, phones: ["homePhone", "workPhone", "beeperPhone", "faxPhone"], bday: "date", cardType: 0, sortOn: "stringWithClass"} // CasioNam.dm2
DUMP!{delay: 5, printFunction: func(v) SPrintObject(v), fieldDelimiter: ";", recordDelimiter: "<EOL>", soupDelimiter: "<EOF>"}

import data from desktop to Names

Names
{labels: 'symbol, name: {class: 'person, honorific: "string", first: "string", last: "string", title: "string"}, company: "string", phones: ["homePhone", "workPhone", "beeperPhone", "faxPhone"], email: "string", address: "string", address2: "string", city: "string", region: "string", country: "string", postal_code: "string", bday: "date", cardType: 0, sortOn: "stringWithClass"}
Business	person	Mr.	Scott "Zz"	Zimmerman	Dudeface Hacker	Apple Computer, Inc.	(408)867-4691	(408)974-6901	1(800)SKYPAGE		ZZ	23290 Big Basin Way		Saratoga	CA	USA	95070	4/23/62	0	company
Personal	person	Mr.	Bob "Zz"	Zimmerman	Dudeface Hacker	Bpple Computer, Inc.	(408)867-4691	(408)974-6901	1(800)SKYPAGE		ZZ	23290 Big Basin Way		Saratoga	CA	USA	95070	4/23/62	0	name
Miscellaneous	person	Mr.	Chuck "Zz"	Zimmerman	Dudeface Hacker	Cpple Computer, Inc.	(408)867-4691	(408)974-6901	1(800)SKYPAGE		ZZ	23290 Big Basin Way		Saratoga	CA	USA	95070	4/23/62	0	company
Important	person	Mr.	Joe "Zz"	Zimmerman	Dudeface Hacker	Dpple Computer, Inc.	(408)867-4691	(408)974-6901	1(800)SKYPAGE		ZZ	23290 Big Basin Way		Saratoga	CA	USA	95070	4/23/62	0	name
BYE!

import data from desktop to Names

Names
{labels: 'symbol,\
name: {class: 'person, honorific: "string", first: "string", last: "string", },\
title: "string", company: "string",\
address: "string", address2: "string", city: "string",\
	region: "string", country: "string", postal_code: "string",\
phones: ["homePhone", "workPhone", "mobilePhone", "faxPhone"],\
pagers: [{pagerNum: "string.pager", pagerPin: "string"}, ],\
email: "string.email", anniversary: "date", bday: "date",\
names: [{honorific: "string", first: "string", last: "string", title: "string",}],\
notes: ["para"], cardType: 0, sortOn: "stringWithClass"}
Business	person	Dr.	Royce	Walthroop	\
Grand VIP	Amalgamated Consolidated	\
217 Crocker Lane		Hillsdale	OH		44704	\
(419)555-3543	(419)555-3544	(419)555-3545	(419)555-3546	\
(123)456-7890	6666	foo@bar.com	8/25/76	12/12/46	\
Ms.	Grace	Mertins	Relative	\
hi, this is a note	0	name
BYE!

Example macros for NOS 2.x systems only

Newtons running NOS 2.x can also use Sloup to transfer outlines and checkLists.

transfer only Unfiled checkLists to desktop

Notes
{labels: nil, class: 'checkList}
DUMP!

transfer only the outlines in the folder named "Business" to desktop

Notes
{labels: 'Business, class: 'list}
DUMP!

transfer two outlines to the folder named "Business" in Notes

Notes
{labels: 'Business, class: 'list}
an outline in Business
	indented item
		another indented item
-----
another outline
	indented1
	indented2
another main entry
	indented1
BYE!

transfer two checkLists from the desktop to the Unfiled folder

Notes
{labels: nil, class: 'checkList}
a checklist in Unfiled
	second level
		a next level item
-----
another checklist
	indented1
	indented2
another main entry
	indented1
BYE!

Each note/outline/checklist is separated by a line of at least 5 dashes, i.e., -----. The last note separator is optional; BYE! will also terminate the last Note. Empty notes are not saved to the Notepad.

transfer two outlines to the folder named "Business" in Notes with formatting info

Notes
{labels: 'Business, class: 'list, viewFont: {family: 'casual, face: 0, size: 10}}
an outline in Business
	indented item
		another indented item
-----
another outline
	indented1
	indented2
another main entry
	indented1
BYE!

transfer To Do list data from Newton to desktop

To Do List
{class: 'todo, Date: "time", repeatInfo: {mtgStartDate: "time",\ 
mtgStopDate: "time", repeatType: "int", mtgInfo: "int",},\
topics: [{level: "int", mtgDone: "boolean", mtgPriority: "int",\
hideCount: "int", text: "string"}],}
DUMP!

transfer data from desktop to "To do" list

To do
{viewStationery: 'symbol, height: "int", mtgStartDate: "date", mtgDone: 'symbol, mtgPriority: "int", data: [{viewStationery: 'symbol, viewBounds: {left: "int", top: "int", right: "int", bottom: "int"}, text: "string", viewFont: "int"}]}
TodoItem	100	2/19/95	nil	3	para	4	0	237	100	todo test1	12289
BYE!

transfer "To do" data from from desktop to Newton

To do
{viewStationery: 'symbol, height: "int", mtgStartDate: "date", mtgDone: 'symbol, mtgPriority: "int", data: ["para"]}
TodoItem	100	2/19/95	nil	3	todo test2
BYE!

list package names on the Newton to desktop

On NOS 2.x, you can list packages, or import or export an individual package. This does not actually access the "package soup" directly but uses a different API. Import/export examples later under binary:packageEntry. To list package names:

Package
{}
DUMP!

export a package named ReStartPkg

Package
{packageName: "ReStartPkg", packageEntry: "binary:packageEntry"}
DUMP!

install a package named ReStartPkg

Package
{packageName: "ReStartPkg", packageEntry: "binary:packageEntry"}
ReStartPkg	!\
7061636B616765307878787800000000000000010000004A004A001600000F7000000000\
...
BYE!

transfer a list of soup names to desktop

Sloup
{}
DUMP!

Can I use Sloup to transfer data between the Newton and an iMac via IrDA?

Yes - Sloup WILL let you send text and graphics back and forth over an IrDA link to an iMac or an appropriate Powerbook. (Note: the MP130 and earlier models are not IrDA-capable.) steps were described by Bill Moser

Troubleshooting

I can't seem to turn off my Newton when Sloup is installed

The Newton cannot turn off when there is a live connection between the Newton and the desktop. Tap "disconnect" on the Sloup interface, and then you should be able to turn off your Newton.

I used Sloup, and now when I try to use NBU/NCU the Newton refuses to connect I get the message "Unable to connect to COM Port".

NBU/NCU and your terminal program may both be trying to access the same com port on your desktop. Close your terminal program, and you should then be able to connect with NBU/NCU. If that still doesn't work, open "NBU/NCU", select "Newton/Settings" and select a different port.

I used NBU/NCU, and now when I try to use Sloup the terminal program refuses to establish a connection I get the message "Unable to connect to Com Port".

NBU/NCU and your terminal program may both be trying to access the same com port on your desktop. Close NBU/NCU, and your terminal program you should then be able to establish a connection.

When I use keyboard pass-thru function, nothing happens when I click the desktop's right/left/up/down arrows the cursor on the Newton screen doesn't move.

Depending on the terminal emulator you are using, arrow keys may not be compatible with Sloup. If this is the case, you will need to use the stylus to maneuver the cursor in the Newton. It may be possible to configure Sloup to recognize special keyboard characters. See the regular Sloup docs on Steve's web-site for further info (slrpfmt.htm#KeyboardMap)

When I use keyboard pass-thru function and I click the desktop's backspace/del key, nothing happens (or I get an error message).

The desktop backspace/delete key, depending on the terminal emulator you are using, may not be compatible with Sloup. If this is the case, you will need to use the stylus to maneuver the cursor in the Newton.

I notice that Sloup has trouble transferring some special characters. Is there a way to fix this?

Yes. Install the "Encoding:NewtsCape" plugin (available to registered Sloup and Newt's Cape users) and the ISO-8859-1 encoding plugin installed (available from Simon Bell), set Sloup to "Command" mode and tap the "Encoding" button in the bottom left corner. This will provide you with a list of all encoding plugins stored in your Newton. Select the one called ISO-8859-1, and this should improve Sloup's handling of special characters.

A view of the selected encoding plugin encoding plugin

I tried to increase the connection speed from 19200 bps to 38400 bps. Now nothing seems to work. What do I do? After you've reconfigured the terminal emulator to run at a higher speed, and have configured Sloup to run at the same speed, close both the terminal emulation program and Sloup. Now start up Sloup and the terminal emulation program again, and see if you can paste text between applications. If not, and the connection still seems bad, return the speed settings to their original settings, then close and restart both programs.

Various connection speeds/options available in Sloup connection options

SloupHelp was prepared by Peter Rand in July 1999 (as a thank you to Steve Weyer for being so patient in answering my incessant questions!)