This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Hypfile is a set of macros for Tom Dolbilin's Macro System 2.0. It has evolved over the last two years. Its main purpose is to facilitate working with filesets. It also provides some basic hypertext or hypermedia features.
As I have already stated before, Hypfile is designed for my personal needs. and it's designed for the German psion3a. As Hypfile uses key-shortcuts to control other applications, you might have to adapt the keycodes for your computer. These keycodes are defined at the beginning of Hypfile.mcr. You can find out the key-codes by switching to MacSys and selecting "Special:Key Codes" from the menu. If you send me your new seetings, I could implement some automatic selection mechanism. Adapt the following procedures:
|ksaveas:||SendKey:( 629, 8, 1) rem psion-u|
|ksave:||SendKey:( 627, 8, 1) rem psion-s|
|kopen:||SendKey:( 623, 8, 1) rem psion-o|
|kfind:||SendKey:( 614, 8, 1) rem psion-f|
|kgoto:||SendKey:( 615, 8, 1 ) rem psion-g|
Next, you also have to redefine some variables at the beginning of Hypfile.mcr:
yes$ = "Ja" rem How to say Yes in dialogs
no$ = "Nein" rem How to say No in dialogs
adr$ = "adressen.dbf" rem The name of your address database.
adr$ is used by some commands (e.g. call). It is assumed that there is one main database, and that this file is located in your default data directory, i.e. "\DAT".
Put hypfile.mcr hypback.mcr hypforw.mcr into your macro directory -- e.g. \Macro\MCR\. Compile them. Install them in MacSys. Assign keys.
There are also some commands. See below for a description of these commands and decide afterwards if you need them. Put the source files into \OPL\. Compile these files. Move the opo-files into a directory called \HYP\ -- even though this is not necessary, as the standard directory \OPO\ is fine, too.
Hypfile creates to files in \OPD\: hypdata.opd and hypback.opd. These files are used for defining data types and to store hypertext information. If uninstalling, don't forget these two files.
Delete hypfile.mcr hypback.mcr hypforw.mcr and the corresponding mco-files in \Macro\MCO\. Delete the command source files in \OPL and the corresponding object-files in \HYP\ or \OPO\.
Hypfile provides (1) Hypertext and (2) a Batch-Command facility.
How does it work? First, it selects some text. Second, Hypfile checks the selection for some valid Hypfile-command. Third, it perfoms some action based upon the information in the selected text.
Hypfile-commands can be written at any place where MacSys can select text -- e.g. Word Documents, Sheet Spreadsheets, Databases, Agendas etc.
The basic syntax is:
|#<file.typ>||switch to another file|
|#<firstname.lastname@example.org>||jump to a mark in the specified file|
|#<command argument>||execute a command.|
In order to minimize typing, there are the following additions:
1. If there is no other text after the Hypfile-command within a paragraph/cell/entry, you may omit <>. Thus, the following would be okay, too: #email@example.com
2. If the other file is of the same type as the actual one, you may omit ".typ". E.g. #file
3. If the destination is the actual file, you may omit "file". E.g. #mark@
4. In some applications (e.g. Agenda, Sheet) you may also omit the preceding "#". In this case the selected entry is interpreted as a Hypfile-command. E.g. in Agenda "call Fred" would invoke the command "call" that searches for "Fred" in your address database and dials his phone number.
5. If the reference to the other file is an absolute path, file.typ has to be preceded by ":". E.g. #:\wrd\file.wrd
6. If the mark contains any spaces, the mark has to enclosed within double-quotes. E.g. #"mark 1"@
7. If the file name is preceded by "~", this shortcut is replaced by a path depending on the actual file type and the name of the actual file. See the following example as an explanation. E.g. If the actual file is called "Hypfile.wrd" #<~file> would be equivalent to #<:\wrd\hypfile\file.wrd>, and #<~file.spr> would be equivalent to #<:\wrd\hypfile\file.spr>. This feature allows working with filesets/projects that are defined in a master file.
8. If the Hypfile-Command ends with ">>" the next Hypfile-Command is processed afterwards. E.g. #<do this>> and #<do that>.
9. If the Hypfile-Command beginns with "##", it will be deleted. (A command could insert some text and, thus, replace the previous command with a new one. See "rotate" for an example.)
This is the main macro. The default file types are defined in "hypinit:". If they don't fit your needs you could either change them here and delete and precious version of hypdata.opd, or you could edit this data file -- if you have already installed hypfile, you could follow this reference: #hypdata.opd
Jumps back to where you came from. It is assumed that you used Hypfile to open the actual file. If it doesn't know the source, it goes to System.
Repeats the last jump perfomed by Hypfile.
Everytime you invoke Hypfile, an entry is stored in #<hypback.opd>, which contains the following information: time, absoult path to destination, source application, source file, destination file was already opened, Hypfile-Reference, context of Hypfile-Reference. You should delete this file from time to time as it can get rather big after long term usage.
Data types (pseudo extension, real extension, default directory, application name) is stored in this file. You can define new data types any time you want. The pseudo extension is used by Hypfile and is replaced by the real extension when opening a file. If there is no pseudo extension, the real one is used. See #<firstname.lastname@example.org> for an example.
These commands are only examples. Take a look at the source code to find out what can be done. Many of these commands take options that are not documented in this file. See the source code for a rudimentary explanation. The misuse of some commands could be dangerous -- e.g. cli.
"See" prepends a mark with ".". I use this for cross-references
within data files.
E.g. #<see x> finds .x
"Ref" encloses the mark with square brackets. Thus, #<ref x> finds [x].
"Goto" uses the goto-dialog instead of "find".
This command provides some cli-commands as dir, mkdir, rmdir, cp, mv, foreach etc. See the source code for examples. Defining variables is possible -- to some extent. As fas as I can remember, there is also an if-else-command. Using this command, you can write more or less complex scripts, though it make the system unstable -- e.g. if you try to execute or load something that doesn't exist.
Execute a compiled Opl-File. Run an application.
I don't know exactly what this one could be good for. One could possibly write self-modifying hypertext-stories. The syntax for "rotate2" is: rotate2 prefix: a1; a2 ...
E.g. #<rotate2 cli beep %10: %1000; %1500>
Call people listed in your address database. E.g. #call Name1;
Name2 ...: Remark
Psion's telephone-symbol (in this document typed as ¥) is a shortcut for this command. Thus, #<¥Fred> does the same as #<call Fred>.
Search for the address of a person listed in your address database.
Dial a number.
Extract data from your address database and insert it or save it in a variable slot for later use. This command needs to be adapted -- i.e. you have to redefine the datafields.
Convert files between txt/rtf-Format and word-Format using the Word-application.
Does nothing. This command is just a marker. Imagine the wordprocessor on your main computer transforms its argument into a footnote.
Show a picture. This code is taken from Nick Murray's shell3a.
Display a sheet-graphic. E.g. #graf graphicname file
Play a wve-file. The source code is taken from some public OPL-Manual. "Snd" can also record and delete wve-files. E.g. #<snd snote 2> the second argument is the maximal length (if recording), or #<play snote>. You could also use the recorder-application: #snote.wve
Download: hypfile.zip (36kb)
|(c) 2001 Thomas Link (last updated Jul 28 2002)||home||top|