2. Command
activates a system conommand used to run another program, read a file or show a picture. System commands need a command word (line 2 in FirstInput.dat) before they will work ie. 'open notepad' will work and notpad will open but 'notepad' on its own wont do anything.
1=System on 9, performs a system command using the ifo in field 9 field 10 is the parameter for executable, field 8 is the reply
2=copy 9 To 10 if field 4 is = 24 then this enforces an absolute order which will enable say copy even if the file exists and will be overwritten
3=show pictures on 9 pictures in ..\Ai\image\
4=delete file in 9 full path
5=move file in 9 to 10 field 4 must = 24 if you want to replace an exsiting file
6=show pictures on 9 full path
11 = turn ON digital channel output 1
12 = turn ON digital channel output 2
13 = turn ON digital channel output 3
14 = turn ON digital channel output 4
15 = turn ON digital channel output 5
16 = turn ON digital channel output 6
17 = turn ON digital channel output 7
18 = turn ON digital channel output 8
21 = turn OFF digital channel output 1
22 = turn OFF digital channel output 2
23 = turn OFF digital channel output 3
24 = turn OFF digital channel output 4
25 = turn OFF digital channel output 5
26 = turn OFF digital channel output 6
27 = turn OFF digital channel output 7
28 = turn OFF digital channel output 8
3. Function
3 is a bit like 2 but instead of performing system commands its used to
carry out functions like combining files and creating html web pages.
You need a function word to activate the function, line 18 in FI
0to2 = unused
2=reply with 7
3=reply with 8 no function command need for 2 or 3 but you do need a
function word before any of the following will work look in
FirstInput.dat or set entry 4=62 and bypass the need for a function word
4=read file on 10 in folder ..\Ai\readout\
5=read file on 10 full path, e.g. c:\allwork\ainew\readout\readouttest.txt
6=read file in 10 into input full path e.g. c:\allwork\ainew\readout\order.txt
7=read file in 10 full path using long file routine. There is a max charater limit set at 20000 if the text has 255 charaters before a return then a gpf may be caused due to variable overload, this is unlikley to happen and would probabley only occur if you were trying to read a file that wasen't a normal text file.
8=like 7 but looks for file in readout directory
9 to 19 unused
20=create html this turns the file in 9 into a HTML file so it can be read by a browser like internet explorer.It works by sanwiching the file in-between two other files which carry the html formating, the lengths of the files needs to be specified so you can use normal web pages that work but still be able to chop off at the point required for insertion into the file. Field 7=top file length length of file in 8, 8=top of file, 9=file to convert, 10=html output file, 11=bottom of file 12=bottom file length of file in 11
21=put output between two files same as file 31 TF but using this means you dont need to alter File 31 TF which is the Ai default.
Make sure that 3 in 31 is set to 21 !.
22=put field 9 in-between the two files
23=same as 21 but if there is anything in 9 then it is added to the beguining of the output
24=used by search routine if 3=24 in entry 19 (Search text file info) then the program adds html coding to the output file at the moment it adds: <p>
At the moment there is no gosub to the createHTML routine when 20 in field 3 is found. This means that the HTML page is only created if Create HTML is ticked in settings. Having it like this means that only one page can be created at a time reducing funcinality for program stability, this method of web page creation is being tested and might change.