Ai by Piet Defoe
11-08-2004
all rights reserved

Ai HELP,
TF fields 5 to 12

Field 5. Kewords, or extra System command. Usually set at 'na'.If not 'na' and field 2 does not = 0 then contents are compared with keywords that trigger pre programed commands embeded in the program.

     
Keywords are case sensitive  


aion
turns on ai output
aioff
turns off ai output NOTE this only turns off the Ai's response it doesn't switch off functions opening files and programs
aiwindowhide hides the ai so its onley visable as a process
aiwindowshow restors the ai window NOTE if you have no comunication with the hidden ai then you wont be able to access it. The only way to close it is to end the process in Task Manager. There is no problem closing the program this way so dont worry about any warnings you may receive.
alwaysansweron activates Auto Ai on bad RQ defalt is on
alwaysansweroff turns off Auto Ai on bad RQ these two are used should the Ai get in an akward loop works both ways depending on TF and Auto Ai settings
autoinputon turn on automatic input,grabs text after you'vre finnished typing
autoinputoff turn off automatic input so you have to press ok to put into input
autoit autoit.exe must be in the path and .aut associated to it, then 8=autoit script to run, 7=reply if script found. Note this performs a system command on 8 and looks in the scripts folder so file extension associations apply, this is another way of performing system commands here its used to activate autoit scripts
brightspot counts the number of bright spots on the image sends the answer to output, start of the find britghtest area in a room when viewing with a web cam
brightspotcompair compairs the number of brightspots with the number generated by a brighspot keyword if there are more bright spots then field 10 is put
into the input if there are less brightspots then field 11 is put into the input.
changetogetstartpath convert address to <getstartpath> only address that contain the start path will be converted
changegetstartpath convert <getstartpath> to propper address
cleardigital1to4 this clears digital chanels 1 to 4 at the end of the processing cycle this enables faster switching. If cleardigital1to4 is in field 5 of the word that
turns the chanel on then it will stay on for a shorter time
cleartoprint clears the ToPrint var which is what is sent to the output
clearputininput clears all 'to be put in input' vars
doesfileexist checks to see if the filename in 9 exits if yes read response in 7 if no read response in 8
expectedininput this tells the Ai to look for the words in field 8 or 9 in the next input see word in input expected paragraph for more details
fastscript turns off the main Ai timer and reads the script into the Ai, normal processing continues after the script has been read if timer: followed by a number then the value is the time between each read of the line.
filetoinput reads the file in 9 into input sentence by sentence every timer loop. The document should be a text doc with a return less than every 256 characters
other wise the string variable will cause a GFP. If a GPF is caused paste the document into notepad, turn off world wrap and press return at the end of the
line. The mode used to translate the input is the same as Auto Ai, field 1 in entry 32.
filetooutput this is exactley the same as filetoinput but it sends the data to the output buffer
iffileexist if filename in 9 exits put 7 into input if not put 8 into input
imagescan scans the display and retains information on the image
imagecompair scans the display and compares the collected data with the data from a previous scan
imagecompairzone similar to imagecompair but isolates the zone of most change and sends the name of the zone to the input. At present there are 3 zones
zone0 = little or no change error count < 10, zone2 left half of image zone3 right half of image. The code for 5 zones is embedded in the program but in order to make it work with the USB K8055 card moving a web cam the zone routine has been desensitized!
indexfolders scans the folder and sub folders starting at the folder in 9 and writes the folder names to text file 'DirNames.txt' which can be found in the data folder, use wildcard ' *.* 'at end of name. E.g c:\temp\*.* This means all files in the folder are read and directories are picked out and added to the list without the *.* the keyword wont work properley.
indexfiles sets up a search file that can be used by searchinfofile or as a playlist. The filename in field 10 is created, this contains the filenames of the files in the folder. Field 11 holds the type of files to include. Field 9 holds the folder to start the search note if looking for .doc files include the capitalised version in field 11 eg. doc DOC txt TXT etc.
lookinlog look in todays log for the word/s, 40 must be in 11 and a patten must be used to trigger the search
namefound uses the name routine, start of the Ai teaching routines so the Ai can be used as an educational tool
nextsong moves to the next track on the play list
ping pings the ip number in field 10 the response is sent to the message file set up in settings if read text file for message or order is not selected in settings then the ping wont happen. The keyword writes the information to the file PingInformation.txt activates the AiPing program which then sends ifo back via the message file
playwavsound plays the .WAV file in field 9, the wav file must be in the 'sounds' folder, mostley used for system sounds
playsong plays the song in field 9 full path recognised types .mp3, .wav, .kar, .mid stopsong stops playback.
playplaylist the file in field 9 holds file name of the file that hols the file names these are played by the mp3 sound routine the Playlist number in settings is the position in the file to start reading the names from the play list will play constantley till stopsong keyword. Play lists can be created using indexfiles.
putininput puts the contents of 8 into the Ai input, (2 must = 0)
put9ininput puts the contents of 9 into input used for long strings
readcontroltf resets the first 40 entries in TF things like time, date etc.
scanfornewfile looks in a directory/folder to see wether and more files have been added
scanfornewjpgfile looks in a directory/folder to see wether an new .jpg (picture file) has been added, if it has it is copied to the image folder and called newimage.jpg all the jpg pictures in the folder are then deleted so the next image that appears will be the correct one to copy when monitoring a picture folder that is receiving images from say a motion detecting web cam.
scroloutput turns on the scrole output to the usb K8055 card
searchinfofile the file in 9 contains the list of files to search simular to searchtextfile but enables you to use a different files to search file. This command is only activated by a pattern that has triggered the extra patern routines. (problamatic...!)
searchtextfile STF look in the text files in entry 19, fields 9, 10. Field 11 is the file name of a text file holding more filenames to be searched. It will carry on searching the files in the list untill the end of the file is reached usually called searchfiles. A file called searchresults.txt is created and can be found in the readout folder this file holds the results from the search routine. This file can be read into the input or output. The word in field 8 is sent to the input and this can trigger a file read into the input or output using filetoinput or filetooutput. Whilst the search routine has been designed to be able to search through any type of file non text files contain special characters which can cause lines to be skipped or end of file notifications to be sent, thus causing the file search to be terminated without searching properley. This can happen with compressed files or data files. Such files are spacific to the program that use them and don't nescessarly use the standard ASCII format. Iv tested .doc.rtf .txt .html and had no problembs with the search. I have also tested stability by searchnig a 1gb video file, it found nothing in the file and took a while but the program didn't crash.
searchfilein9 searches for the word in 6 in the file name full path in field 9, the last found entry is sent to the output
searchfolder sets up a search file that can be used by searchinfofile. The file 'searchtemp.txt' is created in the data folder, this contains the filenames of the files in the folder. Field 10 holds the type of files to include. Field 9 holds the folder to search *.* is required if all files in folder are to be included eg. c:\temp\*.* will search all files in temp any files with an extension present in field 10 will have there name added to the 'searchtemp.txt' file. The extensions are case sensitive so if you are looking for say 'zip' files make sure you include 'ZIP' in field 10 as well. If nother is in field 10 then all filenames and folder names are added to the list.
searchusingindex like search infofile but uses the indexex file names in the file indexfiles.txt created by the keyword indexfiles in the data folder
sendscreen sends the left hand screen as a picture using UDP at mo very slow and blotchey
sendtobrowser sends commands to the browser program, sends contents of field 10 to URL bar
sendtoip changes the send to ip number in settings to the number in 10 and then resets UDP
setfocus sets the Ai as focus and brings the Ai window to top using the script SetFocus.aut
setrqweights used to set the RQ's. The numbers in field 11 sets the RQ's in order, look in settings for more...
showimage shows the image in field 9 another way of showing image without changing field 2 to 3 used mostley with fastscript
showsongname sends the name of the song currentley playing
showsongnamefull sends file name full path of the song currentley playing
showstatsoff turns of statistics display
showstatson turns on statistics display
showsubject sends the subject description to the output
startnetwork switches on network message and network order
stopnetwork switches off network message and network order
stopsong stops a song started with the playsong or playplaylist keyword

writetofile puts the contents of 8 into the filename on 9

Field 5 is also used for extra system commands EG. If 2=1 then the full path of the file to load into the program. e.g. if 2=1 & 9=notepad.exe & 5=c:\text.txt then the text file in C: will be opened in notepad


Field 6. words that require a response ie. Word, pattern,code etc. were looking For more info on


Field 7. Mixed use used by mode 5 the translation of 6 used also for different things needing extra information


Field 8. Mixed use but mainly used by commands set in 5, pattern and reply with 8


Field 9. File commands, run system file, open name file, etc... look at 3 for more details


Field 10. Mixed use mostley used for extra file commands and creating html files


Field 11. Used mostley by pattern recognition or for holding extra information


NoSTM No Short Term Memmory, this is used to tell the short term memory scan routine not to use the word when trying to work out what we are talking about


Field 12. dictionary discription of Word. Used when question and is ie. what is notepad will triger 12 to be sent to the output. Also used for cross refrencing Nouns and Verbs, generating random inputs and creating an answer no matter what by going deeper and deeper for some simalarity now activated by the Neural Net